Posts

Showing posts with the label puzzle

MatchWalker, a puzzle game of shape and colour

Image
Pt En In today's post I will be sharing a game I made with just under $400$ lines in Processing, a wrapper for Java that makes drawing to the screen really easy. The goal of the game is really simple: go from the cell you are standing on (marked with the black outline of the ellipse, in the screenshot) to the cell that is framed in white. To do that, you can move a "cursor" (the black frame) with the $AWSD$ keys to choose the next cell you want to go to. To move, press the space bar. There are a couple of rules to moving, though: You can only move to the selected cell if it is in the same row or same column as the cell you are in; You can only move to the selected cell if it has the same colour or the same shape as the cell you are in. Rule number $1$ says you can only go in the directions these orange arrows cover: Rule number $2$ says that, from the cells specified by the above rule, you can only go to the white circle, diamond or vertical ellipse (precisely becau...

Generalized Sudoku (jigsaw sudoku)

Image
Pt En Muita gente sabe o que é um sudoku: um puzzle com números que se joga numa tabela com $9$ linhas e $9$ colunas. O objetivo é simples: preencher a tabela com os números entre $1$ e $9$, seguindo umas quantas regras. As regras que devem ser seguidas não são complicadas, mas quem já experimentou resolver sudokus sabe que às vezes pode ser bastante difícil completar o puzzle! Para além de resolver problemas, os matemáticos também gostam muito de generalizar . Suponhamos que temos uma série de características e que olhamos para todos os objetos que satisfazem essas restrições; uma generalização desses objetos pode ser dada ao ignorarmos uma das características consideradas. A título de exemplo, suponha-se que estamos à procura de todos os polígonos que satisfazem as seguintes restrições: Tem quatro lados; Todos os lados são iguais; Todos os lados fazem ângulos de $90^\circ$ entre si. É fácil de ver que o quadrado é o único polígono que satisfaz estas duas retrições. Podemos agor...

HueHue: a colourful degradee game

Image
This post's project was made by me and a colleague of mine, Inês Marques. We programmed a small puzzle game, based solely on colours and not on images, that we called HueHue (please mind that the idea for how the game works is not ours). The way the game works is pretty straightforward: you start with a bunch of coloured tiles all mixed up, like in the left image above, and then you want to organize them to create a degradee like the one in the right! The only thing you can take for granted is that the four corners are already correctly placed (and you can't move them, just to prevent accidents). The instructions are also quite simple: you use left and right clicks to swap tiles. Whenever you left-click a tile, you are telling the game that you will want to swap that tile. Whenever you right-click a tile, that tile gets swapped with the last tile you left-clicked! Simple, right? When you finish the puzzle and rearrange the degradee, the window caption changes and you can't ...