Generate more 2 tiles
This commit is contained in:
parent
c05adb499e
commit
aebd34ec31
1 changed files with 3 additions and 3 deletions
|
|
@ -36,10 +36,10 @@ impl<'a> Board<'a> {
|
|||
let y = (random::<u32>() % self.settings.tile_height as u32) as i32;
|
||||
|
||||
if self.get_tile(x, y).is_none() {
|
||||
let score = if random::<u32>() % 2 == 0 {
|
||||
2
|
||||
} else {
|
||||
let score = if random::<u32>() % 10 == 0 {
|
||||
4
|
||||
} else {
|
||||
2
|
||||
};
|
||||
self.tiles.push(Tile::new(self.settings, score, x, y));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue