Code Monkey home page Code Monkey logo

jworldcup's Introduction

JWorldCup

  • APCS Project

Purpose

To change and control the state of 10 or more obejcts randomly and save as well as load their variable data to/from a CSV file

Authors

Version

10/12/2016

Running this project

Run the main() method in the WorldCup class

Details/Controls

  • The window should open with a ball on a field with one goal, but no players
  • The game is paused and blank by default
  • To RESTORE the game to its "initial" or previous state, click the 'Read File' button
  • It will read the game data from ./savedData.csv
  • To PLAY the game (commence the ball's and players' motion) press the 'Play' button
  • To PAUSE the game (halt the ball's and players' motion) press the 'Pause' button
  • To ADD players to the game, click the 'Add Player' button
  • To CLEAR the players from the screen, click the 'Clear Field' button
  • To SPEED up or slow down the animations, move the knob of the 'Speed' slider
  • To SAVE the game's current state to ./savedData.csv click on the 'Save File' button
  • To LOAD the game's last saved state from ./savedData.csv, click on the 'Read File' button
  • "Playing/paused" game state is not saved to allow for efficiently reading from the file
  • Player jersey/skin colors are not saved, and are randomly generated whenever player is added or loaded
  • Saved data includes:
  • All players' positions, and directions/speeds (vectors)
  • Ball position and direction/speed (vector)
  • Current game overall score (total goals scored during game run)
  • Current game animation speed (set by slider)
  • NOTE: Due to the inadequacies of javax.swing, the timers that control animations slow drastically
  • NOTE: It is recommended that the JVM is reset after terminating the program due to, once again, the inadequacies of javax.swing, whose timers may run indefinitely for no reason

Screenshots of a sample run

Window Terminal savedData.csv

jworldcup's People

Contributors

anuvgupta avatar chern avatar nishand17 avatar wchern avatar

Stargazers

 avatar  avatar  avatar

Watchers

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