joel99 / Team_2D

Risk - Joel Ye and William Xiang
0 stars 1 forks source link

Game update(Country c) not working properly #6

Closed joel99 closed 8 years ago

joel99 commented 8 years ago

When conquering, as numbers reach into 2 digits and later get overwritten into a one digit number, residue remains (14 -> 8 looks like 14 -> 48). Fix the update() function in Game.java to avoid this.

joel99 commented 8 years ago

bump, this is fairly important

wxiang54 commented 8 years ago

Original:

while (Util.userChars.indexOf(map.get(x++,y)) != -1)
        map.set(x,y, ' ');

The x++ was testing if the space was an alphanumeric, but if it was, the char to the right of it would be changed.

Just changed x++ to x and all was fixed :smile: