Giter Club home page Giter Club logo

rochambo's Introduction

rochambo

Flex based rock-paper-scissors; why Rochambo? according to wiki it is a synonym: http://en.wikipedia.org/wiki/Rock-paper-scissors

BUILD

  • make sure you are able to run Ant scripts

The project contains an ant build.xml. When running this, please make sure to point to the correct Flex SDK folder on your local machine. This project has been tested with Flex SDK 4.6.

CONFIG

By default, 3 game modes are available:

  • classic rock-paper-scissors
  • big bang theory's rock-paper-scissors-lizard-spock
  • world cup, where rock, paper and scissors are replaced by Lionel Messi, Vincent Kompany and Bastian Schweinsteiger

You can remove or add game modes using the rules.json file found in the assets directory.

TEST

I have included a test suite under src/test/suites

This suite contains one test (as example), this test will load the rules.json and validate the contents.

A rule is valid when:

  • it contains choices (RulesetAssets)
  • it is balanced => this means that each choice must have an equal chance to win
  • the win/los/tie matrix must have the correct size (rows, columns equal to the amount of choices)
  • for every win, there must be a win message (i.e. rock crushes scissors)

Obviously, more tests could be added (i.e. UI)

CONTROLS

  • Player vs CPU: player uses mouse to select
  • Player vs Player: Player one uses mouse, player two uses numpad keys

DOCUMENTATION

The ant build will also generate asdocs, to illustrate, I've documented the actors package (Actor, IActor, CPUActor, PlayerActor)

rochambo's People

Contributors

frankpepermans avatar

Stargazers

Hans Van den Keybus 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.