Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: samples/pop_pop_win/lib/src/poppopwin/game.dart

Issue 200723008: samples/poppopwin: upgrade to first-class sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixed pkgbuild.status for rename Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 part of ppw; 1 part of ppw;
2 2
3 class Game { 3 class Game {
4 final Field field; 4 final Field field;
5 final Array2d<SquareState> _states; 5 final Array2d<SquareState> _states;
6 final EventHandle<EventArgs> _updatedEvent = new EventHandle<EventArgs>(); 6 final EventHandle<EventArgs> _updatedEvent = new EventHandle<EventArgs>();
7 final EventHandle<GameState> _gameStateEvent = new EventHandle<GameState>(); 7 final EventHandle<GameState> _gameStateEvent = new EventHandle<GameState>();
8 8
9 GameState _state; 9 GameState _state;
10 int _bombsLeft; 10 int _bombsLeft;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 int _getAdjacentCount(int x, int y, SquareState state) { 287 int _getAdjacentCount(int x, int y, SquareState state) {
288 int val = 0; 288 int val = 0;
289 for(final i in field.getAdjacentIndices(x, y)) { 289 for(final i in field.getAdjacentIndices(x, y)) {
290 if(_states[i] == state) { 290 if(_states[i] == state) {
291 val++; 291 val++;
292 } 292 }
293 } 293 }
294 return val; 294 return val;
295 } 295 }
296 } 296 }
OLDNEW
« no previous file with comments | « samples/pop_pop_win/lib/src/poppopwin/field.dart ('k') | samples/pop_pop_win/lib/src/poppopwin/game_state.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698