Git Product home page Git Product logo

squareswapper's Introduction

SquareSwapper 5000

A Candy Crush inspired game for the final CS246 project.

Building and Running the Program

Make sure you have the necessary library to compile graphics (X11 recommended).

Start and run an X server, export the display if necessary.

Compile the program by using the make command.

Run the program:

./ss5k

Command Line Input

  • swap x y z swaps the square at the (x, y) co-ordinate with the square in the z direction
    • 0 for north
    • 1 for south
    • 2 for west
    • 3 for east
  • hint returns a valid move (x, y, z) as above that would lead to match
  • scramble (available only if no moves are possible) reshuffles the squares on the board
  • levelup increases the difficulty level of the game by one
  • leveldown decreases the difficulty level of the game by one
  • restart clears the board and starts a new game at the same level
  • End-of-file (EOF) terminates the game

Command Line Options

  • -text runs the program in text-only mode, i.e. no graphics, default displays graphics
  • -seed x sets the random number generator's seed to x
  • -scriptfile file uses file for this level's intial board configuration
  • -startlevel n starts the game in level n, default is level 0
Example
./ss5k -text -startlevel 2

starts the game at level 2, in text only mode, and all other options as default

Authors

@fredcao

@KevinChenXue

squareswapper's People

Contributors

fredcao avatar kevinchenxue avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.