Coder Social home page Coder Social logo

project.risk's Introduction

Hi there ๐Ÿ‘‹ I'm Norman

It seems you found my personal cave on GitHub.

project.risk's People

Contributors

aberinnj avatar chimeenjoku avatar

project.risk's Issues

FortifyTerritories function bug does not accept skipping fortification

To fortify, we move armies from one country to another and only countries with more than 1 army can move.

Problem
If the only country that can move its armies to other territories has no neighbors and other territories only have 1 army,
the user cannot enter any other territory,
the program does not allow users to skip.

Solution
Give option to skip fortification.

Refactor Code

Refactor/Rewrite army transfer and addition
Refactor fortifyPlayersTerritory in GameManager

Note: This is a reminder to myself. I'll refactor them myself, unless you would like to

GameLoop may have incorrect implementation

Problem
The gameloop may exit even when it seems the players have not taken all available territories.

Where
GameManager's main, check if while(!isGameOver(bm)) works properly

To Debug faster:

  • comment-out some of the functions(actions) inside the loop
  • make use of breakpoints and check the value of isGameOver(bm)

Next Moves, Sep 9

Thanks to Norman we have a great structure to build the map and use going forward. I think the next steps in this regard is incorporating play functionality like player actions and placing or moving armies etc. While he does this I will work more on building a good GUI. One thing I noticed is the player initialization only includes cavalry. I think it would be worth measuring out a set of tokens that players can then spend on military units since one set of rules for risk I read measured everything out using infantry units for measuring value. That way we can come back to this functionality when players are redistributing their armies or being rewarded new armies at the beginning of a turn.

BoardManager gets stuck on initializeTerritories loop with 2 more players

Expected
Exit the initializeTerritories loop after all territories are assigned and taken

Actual
With >2 players, the loop doesn't end

Where:
fix isAllTerritoriesInitialized in BoardManager.

  • Check if AllTerritories have a player OccupantID assigned to it.
  • Or make a counter, but it may not be the best idea
  • Or make a list to pull values from and loop while the list is not empty

GUI

So Dr. Alipour mentioned that we do not need a GUI for this.
I am still down for the entire thing, but I think I would rather do an android app.
Or
We can just keep it simple and do it without a gui.
What do you guys think?

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.