ameer50
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    README ==== This project implements a suite of strategy-based games enhanced with CPU functionality. Games include Chess, Checkers, Othello, Connect4, and even Custom games. Names: Ameer Syedibrahim, Karthik Ramachandran, Michael Xue, Eric Carlson, Amjad Syedibrahim ### Timeline Start Date: 4/2/2020 Finish Date: 4/24/2020 Hours Spent: 500 hours ### Primary Roles Ameer - Frontend/Controller (Primary), Backend (Secondary) - I worked designing the menu screen, popups, and game screen to allow for a flexible design. - Specifically, I helped design the board view, pieces arrangement, dashboard view, and the buttons that the user would click to interact with the game. - Minor frontend features added: Dark mode, New Window, class to easily make Popups - I helped build the Othello and Connect4 game in the Backend, Controller, and Frontend. This involved implementing the methods in the game-specific classes in the backend and working with the existing design to integrate it in the controller and frontend. - Worked on core logic for Othello including a map of pieceTrails, a necessary component of Othello which could be generalized - Assisted with the design and implementation of the Move class, the key component of the Controller that allowed for a conceptual definition of what a move means across multiple diverse games. Karthik - Backend (Primary), generalist role (minimal) * Wrote the Chess game to follow rules of chess including promoting pieces, determining checkmate, preventing pieces from moving into check, and even enforcing pinning on blocking pieces * Designed and implemented the Piece class to be generalizable to all games while storing sufficient information to be useful * Designed the Board abstract class to contain appropriate methods for all games while balancing abstraction with game-specific functionality * Other roles include working on AI to increase speed of algorithm and standardizing games to avoid errors, helping debug and implement recursion in checkers, and minor additions to controller Michael - Frontend/Controller (Primary), Backend (Secondary) * Wrote the controller and designed the flow of data between backend and frontend for various games and features * Assisted with frontend for creating the board and cells, the dashboard, popups, and various screens * Created the design of the Player, History, and Move classes * Enabled scoring, undo/redo, and capturing/converting pieces functionality * Helped build Othello and ConnectFour on both the backend and frontend * Worked on error handling/refactoring Eric - AI/Custom games(Primary), JSON (secondary) * Designed all AI algorithms, including random and trivial (first available) move and alpha-beta minimax, which travels move trees down several layers before selecting the highest scoring first move. * Worked with backend team to make repeated board creations as efficient as possible to speed up AI move generation * Implemented custom game JSON format to enable users to create their own custom moves in any manner they choose while ensuring CustomBoard is able to handle most changes to what user wants * Worked on shifting from XML to JSON to allow for greater ease of customizability for users without impacting the rest of the project Amjad - Backend (Primary), Controller (Very Minimal) - I worked primarily on the game of Checkers, which is one of the main game options the player has. - More specifically, I worked on expanding the design to be flexible and generalize to the various combinations of moving, promoting and stacking that the player can do - Other roles include, Error Handling, JUnit Testing, Structuring data away from the classes into properties files. ### Resources Used Stack Overflow - https://stackoverflow.com/questions/40384558/javafx-how-to-center-the-center-node-on-a-borderpane-according-to-the-stage - https://stackoverflow.com/questions/37689441/javafx-text-control-setting-the-fill-color - https://stackoverflow.com/questions/49059786/center-a-vbox-in-the-middle-of-a-borderpane-in-javafx - https://stackoverflow.com/questions/22412759/how-to-set-listview-border-in-javafx - https://stackoverflow.com/questions/36652453/javafx-inserting-image-into-a-gridpane ### Running the Program Main class: Controller.java Data files needed: * Running requires the following jars: * https://github.com/google/guava/wiki/Release23 (guava-23.0.jar) * http://www.java2s.com/Code/Jar/j/Downloadjsonsimple111jar.htm (json simple 1.1.1) Features implemented: * All games * Click on pieces to highlight valid moves and make moves * Error handling on loaded files and invalid moves * Icons to allow for adding new pieces to the board in Connect 4 and Othello * Undo and redo moves * Load from and save state to JSON * Three different AI levels: trivial, random, and alpha-beta minimax * History - detailed log of every piece and its initial and final location * Scoring * New Window * Dark Mode - inverts colors of screen * Skip Turn - allows user to skip their turn * Return to Menu * Chess * Piece movements * Checkmate fully implemented * Pinned pieces can't move * Pieces can't move if king is under check * Promoting pawns to queens with undo functinoality * Checkers * Piece movements * Stacking multiple kills (zigzags, multiple jumps, etc.) * Multidirectional piece movements * Undo promotions * Promotion to monarchs * Othello * Piece additions to the board from icon * Trail of pieces are tracked (converted pieces map changes coins from one color to the other) * Player score increases when converting pieces of the other color * Pieces on the board can't be clicked once placed * If board is full or neither player can place a piece, return the winner as the player with most pieces on the board * Connect 4 * Piece additions to the board from icon * Piece needed variable which keeps track of number of pieces in a row to win (for n number in a row, can generalize to Connect n) * Pieces on the board can't be clicked once placed * If board is full and neither team has won, returns tie * Custom * Users can set up basic move patterns, or combine them into compound move patterns, to define how pieces function * Backend work supports any combination of methods generated in order to ensure complete customizability * Pieces can be killed and scores can be added * Full functionality with AI ### Notes/Assumptions Assumptions or Simplifications: * Assume player must click on a cell with a piece in order to move it (reason for icons for piece-generating games like Othello and Connect 4) * Converted pieces and promoted pieces behave the same way and are assumed to be the same. Our Move class has a map that holds convertedPieces. This concept of transforming n number of pieces from one piece to another pieces is used in games such as Othello, Chess, and Checkers, and thus required a mechanism for generalization. * Made icons part of the frontend and backend in order to preserve the implementation of setOnPieceClicked lambda Interesting data files: * JSON data file for loading in initial game states and configurations. * CSS Style Sheets for different color schemes and themes * Properties files for dumping data structures that are too cumbersome to put in the class Known Bugs: * Player 1 always moves first, so black will move first in Chess if black is selected as player 1 * Undo move leads to a turn issue for AI for one turn forcing the user to control the AI team ### Impressions Our impressions of the project as a team are very positive. We were very pleased with the flexibility we had in choosing what game types to implement. Given the three week time constraint we had on this project, we found the requirments of the project to be very plausible and reasonable for our team. We were able to accomplish the goal of the project with each teammate putting in roughly 3-4 hours of work a day. We also felt that this project did a tremendous job of teaching us about design patterns and other functionalities in Java that allow for the creation of a data-driven program. Overall, the performance of Team Hirudinea was solid and the project came together nicely.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully