Giter Club home page Giter Club logo

ija's Introduction

IJA

VUT FIT IJA 2016/2017

[pullStack][trashStack].....[tpack][tpack][tpack][tpack]

.......[wpack][wpack][wpack][wpack][wpack][wpack][wpack]

src/ija2016... Basic classes

src/game

  • Game - game object, contains all stacks, CommandManager(undo/redo history)
  • Main - contains main function. Wraps the whole program. Runs GUI
  • GUISwing - unused

src/commands - classes needed for undo/redo history. These classes wrap all stack+cards manipulation.

GAME methods

  • boolean game.cmdManager.execute(new SomeCommand(param1, param2)) to execute a command
  • void game.cmdManager.undo() to undo a command
  • Game game.saveGame(String name) to save a game to ./saves/$name
  • Game game.loadGame(String name) to load a game from ./saves/$name
  • void game.showStacks() to print all stacks to the CLI
  • Hint game.showHint() to receive Hint() object with hint for the next move.

Hint contains these attributes

  • CardDeck src = stack from which a card is to be taken
  • CardDeck tar = stack to which a card is to be put
  • Card c = card which is to be selected and moved from src to tar

COMMANDS

  • public TurnCardPullStackCommand(CardDeck pullStack,CardDeck trashStack)

pullStack = Stack from which cards are drawn when no move is possible

trashStack = Stack where card is placed

  • public PutStackCommand(WorkingPack sourceStack, WorkingPack targetStack, Card card)

sourceStack = Stack from which stack is moved to 'targetStack'. Only cards from "card" up to top are moved

targetStack = Stack where the mentioned stack is put

card = explained above

  • public PullCardCommand(WorkingPack workingPack, CardDeck trashStack)

workingPack = stack to which the card from trashStack will be placed

trashStack = top card from here is used

  • public PutToTargetPackCommand(CardDeck sourceStack,TargetPack targetStack)

sourceStack = the stack from which top card is moved to targetStack

targetStack = one of the targetStacks

run 'ant run' in the directory where build.xml is located. Gui from src/game/Main.java is loaded.

ija's People

Contributors

mireckazimir avatar seki98 avatar skisela avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.