abusharkhm/Galaxy
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
CONTENTS:
---------
galaxy/
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 positions of
centers and barriers. It contains the logic for
adding and removing barriers, testing that constraints
are satisfied, and testing for a solution.
Controller.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 your program. It makes
use of the --testing option in your 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.