All Projects → sharkdp → Cube Composer

sharkdp / Cube Composer

Licence: mit
A puzzle game inspired by functional programming

Programming Languages

purescript
368 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to Cube Composer

Rush
Rush Hour puzzle goodies!
Stars: ✭ 233 (-87.37%)
Mutual labels:  game, puzzle
Lila
♞ lichess.org: the forever free, adless and open source chess server ♞
Stars: ✭ 10,315 (+459.08%)
Mutual labels:  game, functional-programming
Quantum Game
Quantum Game (old version) - a puzzle game with real quantum mechanics in a browser
Stars: ✭ 294 (-84.07%)
Mutual labels:  game, puzzle
Antimine Android
Antimine is an open source minesweeper-like puzzle game.
Stars: ✭ 218 (-88.18%)
Mutual labels:  game, puzzle
Matchimals.fun
🦁 🃏 📱 An animal matching puzzle card game– built with turn-based game engine boardgame.io and React-Native + React-Native-Web
Stars: ✭ 101 (-94.53%)
Mutual labels:  game, puzzle
Nodulus
Puzzle game with clever twists (Unity3d)
Stars: ✭ 232 (-87.43%)
Mutual labels:  game, puzzle
Match3
✨🐠The most original game on Earth: Match3 - now in Unity!✨🐟
Stars: ✭ 50 (-97.29%)
Mutual labels:  game, puzzle
Breaklock
Web game, hybrid of Mastermind and the Android pattern lock
Stars: ✭ 232 (-87.43%)
Mutual labels:  game, puzzle
Tetris
A clone of the popular game Tetris.
Stars: ✭ 96 (-94.8%)
Mutual labels:  game, functional-programming
Taelinarena
[outdated] A moddable MOBA in Formality
Stars: ✭ 84 (-95.45%)
Mutual labels:  game, functional-programming
Ordinary Puzzles App
Mobile and web puzzle game built with React-Native
Stars: ✭ 376 (-79.62%)
Mutual labels:  game, puzzle
Lambda Lantern
🧙 ‎‎ A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.
Stars: ✭ 122 (-93.39%)
Mutual labels:  game, functional-programming
Regex
A Regular Expression game for Android
Stars: ✭ 80 (-95.66%)
Mutual labels:  game, puzzle
Dunai
Classic and Arrowized Functional Reactive Programming, Reactive Programming, and Stream programming, all via Monadic Stream Functions
Stars: ✭ 115 (-93.77%)
Mutual labels:  game, functional-programming
Android Jigsaw Puzzle
Android app that allows you to draw anything and turn it into a jigsaw puzzle.
Stars: ✭ 139 (-92.47%)
Mutual labels:  game, puzzle
Ip4s
Defines immutable, safe data structures for describing IP addresses, multicast joins, socket addresses and similar IP & network related data types
Stars: ✭ 145 (-92.14%)
Mutual labels:  functional-programming
Carmelo
Carmelo is a fast, scalable Java server framework designed for online games. It uses Netty and Fastjson for highly efficient network transmission and supports both TCP/HTTP protocols.
Stars: ✭ 148 (-91.98%)
Mutual labels:  game
Monix
Asynchronous, Reactive Programming for Scala and Scala.js.
Stars: ✭ 1,819 (-1.41%)
Mutual labels:  functional-programming
Lexica
Word Game for Android - A fork of lexic (https://code.google.com/p/lexic)
Stars: ✭ 146 (-92.09%)
Mutual labels:  game
Munus
Power of object-oriented programming with the elegance of functional programming in PHP.
Stars: ✭ 149 (-91.92%)
Mutual labels:  functional-programming

cube composer

A puzzle game inspired by functional programming, written in PureScript.

Play it online!

Local install

git clone https://github.com/sharkdp/cube-composer.git
cd cube-composer
npm install
bower install
gulp

Creating new levels

Levels are grouped into chapters. Each chapter has a dedicated file in the folder src/Levels/. To create a new chapter, you can copy one of the existing files, bump the chapter number and add it to the allChapters list in Levels.purs. Each chapter comes with a specific list of transformers (functions). As an example, we look at map (Yellow ↦ Red) in Chapter0.purs:

"replaceYbyR" :> {
    name: "map {Yellow}↦{Red}",
    function: replaceSingle Yellow Red
}

Here, replaceYbyR is an internal ID which is used to identify the transformer, map {Yellow}↦{Red} is the displayed name of the transformer ({x} will be replaced by a small cube of color x) and replaceSingle Yellow Red is the implementation of the transformer. The function field in the record has to be of type Transformer, where

type Stack = List Cube
type Wall = List Stack
type Transformer = Wall -> Wall

Consequently, a Transformer is a function that transforms a 2D array of cubes (Wall). Some basic transformers are given in Transformer.purs.

Each level is given by a record like

"0.2" :-> {
  name: "Level title",
  help: Just "...",
  difficulty: Easy,
  initial: [[Yellow, Yellow, Red], [Yellow, Red], ...],
  target: [[Red], [Red], [Red], [Red], [Red], [Red]]
}

where 0.2 is the Chapter.Level ID of the level, name is the title of the puzzle, help is the help text shown in the right panel, difficulty is Easy, Medium or Hard and initial :: Wall and target :: Wall are the inital and target 2D arrays of cubes.

Please send a pull request if you would like to add your puzzles to the game.

CI status

Build Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].