This repository has been archived by the owner on Jan 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad20a93
commit 3530ca7
Showing
16 changed files
with
561 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,3 @@ | ||
# Mastermind Project Wiki | ||
# Mastermind | ||
|
||
## Project Structure | ||
|
||
```tree | ||
. | ||
├── app | ||
│ ├── bin | ||
│ ├── build | ||
│ └── src | ||
│ ├── main | ||
│ │ ├── java | ||
│ │ │ └── mastermind | ||
│ │ │ ├── core | ||
│ │ │ │ └── solvers | ||
│ │ │ ├── gui | ||
│ │ │ │ ├── panels | ||
│ │ │ │ └── scenes | ||
│ │ │ └── utils | ||
│ │ └── resources | ||
│ └── test | ||
│ ├── java | ||
│ │ └── mastermind | ||
│ └── resources | ||
├── build | ||
└── gradle | ||
``` | ||
|
||
### Build Directories | ||
|
||
- `app/bin` | ||
- `app/build` | ||
- `build` | ||
|
||
### Gradle Directory | ||
|
||
- `gradle` | ||
|
||
### Project Sources | ||
|
||
- `app/src/main/java/mastermind/core` core (non-gui) components of program | ||
- `app/src/main/java/mastermind/core/solvers` algorithms for solving mastermind game | ||
- `app/src/main/java/mastermind/gui` gui components of program | ||
- `app/src/main/java/mastermind/gui/panels` shareable gui components | ||
- `app/src/main/java/mastermind/gui/scenes` scenes/stages/pages/screens of the game | ||
- each page/stage/screen of the program is a scene | ||
- e.g., game mode selector, code breaker gameplay, code maker gameplay | ||
- `app/src/main/java/mastermind/utils` general utilities that are not directly | ||
associated with program logic | ||
- i.e., components that can be reused by other projects | ||
- e.g., helper methods, data structures | ||
|
||
### Unit Tests | ||
|
||
- `app/src/test/java/mastermind` | ||
|
||
## Solvers | ||
|
||
```mermaid | ||
classDiagram | ||
MastermindSolver <|-- HumanSolver | ||
MastermindSolver <|-- MastermindAlgorithm | ||
MastermindAlgorithm <|-- EasyAlgorithm | ||
MastermindAlgorithm <|-- MediumAlgorithm | ||
MastermindAlgorithm <|-- DonaldKnuthAlgorithm | ||
class MastermindSolver { | ||
<<abstract>> | ||
+getattempts(): int | ||
#isInitialguess(): boolean | ||
#hasExeededMaxGuesses(): boolean | ||
} | ||
class MastermindAlgorithm { | ||
<<abstract>> | ||
+guess(): Code* | ||
+guess(response: Response): ~Status, Code~* | ||
} | ||
``` | ||
|
||
## Scenes (GUI) | ||
|
||
Each scene inherits `src/gui/scenes/Scene.java`. | ||
|
||
### Transitions | ||
|
||
Note that the node names correspond to classes in `src/gui/scenes`. | ||
|
||
```mermaid | ||
flowchart TB | ||
mode_select --> algorithm_select | ||
mode_select --> code_maker | ||
algorithm_select --> code_breaker | ||
code_maker --> result | ||
code_breaker --> result | ||
mode_select[GameModeSelector] | ||
result[Result] | ||
subgraph code breaker | ||
algorithm_select[CodeBreakerSelector] | ||
code_breaker[CodeBreaker] | ||
end | ||
subgraph code maker | ||
code_maker[CodeMaker] | ||
end | ||
``` | ||
|
||
## Communications Between Solvers and GUI | ||
|
||
### Algorithmic Solvers | ||
|
||
```mermaid | ||
sequenceDiagram | ||
solver ->> gui: first guess | ||
gui ->> solver: user response (hints) | ||
solver ->> gui: next guess | ||
``` | ||
|
||
### Human Solver | ||
|
||
```mermaid | ||
sequenceDiagram | ||
gui ->> solver: user guess | ||
solver ->> gui: response (hints) | ||
``` | ||
Please see [project wiki](https://powersagitar.github.io/ics4u). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[*.md] | ||
max_line_length = 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
_site | ||
.sass-cache | ||
.jekyll-cache | ||
.jekyll-metadata | ||
Gemfile.lock | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
permalink: /404.html | ||
layout: default | ||
--- | ||
|
||
<style type="text/css" media="screen"> | ||
.container { | ||
margin: 10px auto; | ||
max-width: 600px; | ||
text-align: center; | ||
} | ||
h1 { | ||
margin: 30px 0; | ||
font-size: 4em; | ||
line-height: 1; | ||
letter-spacing: -1px; | ||
} | ||
</style> | ||
|
||
<div class="container"> | ||
<h1>404</h1> | ||
|
||
<p><strong>Page not found :(</strong></p> | ||
<p>The requested page could not be found.</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
source "https://rubygems.org" | ||
# Hello! This is where you manage which Jekyll version is used to run. | ||
# When you want to use a different version, change it below, save the | ||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: | ||
# | ||
# bundle exec jekyll serve | ||
# | ||
# This will help ensure the proper Jekyll version is running. | ||
# Happy Jekylling! | ||
# gem "jekyll", "~> 4.3.4" | ||
# This is the default theme for new Jekyll sites. You may change this to anything you like. | ||
# gem "minima", "~> 2.5" | ||
|
||
gem "just-the-docs" | ||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and | ||
# uncomment the line below. To upgrade, run `bundle update github-pages`. | ||
gem "github-pages", "~> 232", group: :jekyll_plugins | ||
|
||
# If you have any plugins, put them here! | ||
group :jekyll_plugins do | ||
gem "jekyll-feed", "~> 0.12" | ||
end | ||
|
||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem | ||
# and associated library. | ||
platforms :mingw, :x64_mingw, :mswin, :jruby do | ||
gem "tzinfo", ">= 1", "< 3" | ||
gem "tzinfo-data" | ||
end | ||
|
||
# Performance-booster for watching directories on Windows | ||
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin] | ||
|
||
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem | ||
# do not have a Java counterpart. | ||
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Welcome to Jekyll! | ||
# | ||
# This config file is meant for settings that affect your whole blog, values | ||
# which you are expected to set up once and rarely edit after that. If you find | ||
# yourself editing this file very often, consider using Jekyll's data files | ||
# feature for the data you need to update frequently. | ||
# | ||
# For technical reasons, this file is *NOT* reloaded automatically when you use | ||
# 'bundle exec jekyll serve'. If you change this file, please restart the server process. | ||
# | ||
# If you need help with YAML syntax, here are some quick references for you: | ||
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml | ||
# https://learnxinyminutes.com/docs/yaml/ | ||
# | ||
# Site settings | ||
# These are used to personalize your new site. If you look in the HTML files, | ||
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. | ||
# You can create any custom variable you would like, and they will be accessible | ||
# in the templates via {{ site.myvariable }}. | ||
|
||
title: Mastermind Wiki | ||
email: 350877700@gapps.yrdsb.ca | ||
|
||
description: >- # this means to ignore newlines until "baseurl:" | ||
Project wiki for Mastermind, the ICS4U culminating project. | ||
baseurl: "/ics4u" # the subpath of your site, e.g. /blog | ||
url: "https://powersagitar.github.io" # the base hostname & protocol for your site, e.g. http://example.com | ||
|
||
permalink: pretty | ||
|
||
# twitter_username: jekyllrb | ||
github_username: powersagitar | ||
|
||
# Build settings | ||
theme: just-the-docs | ||
|
||
mermaid: | ||
version: 11.4.1 | ||
|
||
plugins: | ||
- jekyll-feed | ||
# Exclude from processing. | ||
# The following items will not be processed, by default. | ||
# Any item listed under the `exclude:` key here will be automatically added to | ||
# the internal "default list". | ||
# | ||
# Excluded items can be processed by explicitly listing the directories or | ||
# their entries' file path in the `include:` list. | ||
# | ||
# exclude: | ||
# - .sass-cache/ | ||
# - .jekyll-cache/ | ||
# - gemfiles/ | ||
# - Gemfile | ||
# - Gemfile.lock | ||
# - node_modules/ | ||
# - vendor/bundle/ | ||
# - vendor/cache/ | ||
# - vendor/gems/ | ||
# - vendor/ruby/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
# Feel free to add content and custom Front Matter to this file. | ||
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults | ||
|
||
layout: page | ||
nav_order: 3 | ||
--- | ||
|
||
# Building the Project | ||
|
||
This project is built using [Gradle](https://gradle.org), with Gradle wrapper | ||
bundled. | ||
|
||
From this point on, you are assumed to be in [project root](http://powersagitar.github.io/ics4u/#project-root) | ||
and using the terminal, and on a UNIX or UNIX-like system. | ||
|
||
If you are on Windows, please replace occurrences of `gradlew` with `gradlew.bat`. | ||
|
||
## Compiling the Project | ||
|
||
Run the following command: | ||
|
||
```zsh | ||
./gradlew build | ||
``` | ||
|
||
## Running the Project | ||
|
||
Run the following command: | ||
|
||
```zsh | ||
./gradlew run | ||
``` | ||
|
||
This command invokes [build](#compiling-the-project) automatically. | ||
|
||
## Running Unit Tests | ||
|
||
Run the following command: | ||
|
||
```zsh | ||
./gradlew test | ||
``` | ||
|
||
## Building Project Wiki | ||
|
||
Install [Jekyll](https://jekyllrb.com/docs/installation/). | ||
|
||
Run the following command: | ||
|
||
```zsh | ||
utils/start-local-wiki.sh | ||
``` |
Oops, something went wrong.