sameerkhanna786 / 2048_java Goto Github PK
View Code? Open in Web Editor NEWVersion of the hit game 2048
Version of the hit game 2048
This directory contains my version of the popular game 2048. The size of the game and probabilities of certain numbers appearing are completely configurable. CONTENTS: --------- README This file. Makefile This file provides for some simple compilation/testing control. See the comments in it for the targets provided. If you are using Eclipse will need it on the instructional machines (the commands 'make' and 'make check' must work correctly on your submission, regardless of which editor or IDE you used). game2048/ Makefile A Makefile for compiling, style checking, testing, and cleaning up files in this directory. Main.java Entry point to program. This handles program options and sets up the necessary objects to play one or more games. Model.java This class describes game state: the contents of the board and the scores. It contains the logic for tilting the board so that tiles slide to new positions. Tile.java Describes a single tile on the board. Side.java An enumeration type for the directions in which the board can tilt. Contains functions that allow you to change the coordinate system---to treat any side of the board as "south" with rows and columns rotated accordingly. Game.java Contains the logic for controlling a game: responding to commands by updating the model as apppropriate. InputSource.java An interface to get input to the game, which consists of keystrokes and random tile positions. It has two implementing subtypes: GUISource and TestSource. GUISource.java An InputSource that fetches inputs from a user's key presses and generates tiles using a pseudo-random number generator (PRNG). TestSource.java An InputSource that fetches recorded key presses and tile positions from a file, allowing you to create and run tests. GUI.java Represents the graphical display of the game state and receives key presses from the user. The GUI "observes" the model and responds to changes in it. BoardWidget.java Used by GUI to represent the grid of squares and tiles. BoardLogger.java Another observer of the game state that prints the states of the board to a file, thus allowing one to capture and check the board positions generated by the program. testing/ Directory with integration test machinery. tester.py A Python 3 script for testing the program. It makes use of the --testing option in the program to feed in known moves. testing.py A module that supports testing in general. *.in Test scripts accepted by the tester. *.out The outputs (logged by BoardLogger) expected for each test.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.