aclonegeek / rummikub Goto Github PK
View Code? Open in Web Editor NEWCOMP3004 - Group Project
License: MIT License
COMP3004 - Group Project
License: MIT License
Adding R1 to {R2, R3, J} produces {R2,R3} rather than {R1,R2,R3,J}.
Melds and hands are printed separated by , when it should be a space.
Why? We decided to make the playBehaviour an observer, and it changes between Strategy1 and Strategy2. Bad idea.
To be done for the final submission.
We're missing full test case coverage.
Game
Meld
PlayBehaviour
PlayerHuman
StrategyHuman
Table
for (int j = 0; j < greatestMeld.getSize(); j++) {
hand.remove(greatestMeld.getTile(j));
}
and later:
if (totalTileValue >= 30) {
return this.workspace;
}
So if totalTileValue <= 30, the tiles are removed from the hand without being played.
Will fix in #61.
This is because the melds
parameter that is passed in is a reference to the table's melds, so whenever you change the table melds then the player's workspace will change too. To avoid this, you need to make a copy of the incoming ArrayList. Here's an example:
this.workspace = new ArrayList<>(melds);
public void removeObserver(TableObserver player) {
int i = players.indexOf(player);
if (i >= 0) {
players.remove(i);
}
}
All possible branches of the if statement are not covered.
We should leave this until we have a working game.
if (largestMeldOver30 != null) {
this.workspace.add(largestMeldOver30);
return this.workspace;
}
The tiles should be deleted before returning the workspace. I have a fix cooked up.
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.