index.dart 553 B

123456789101112131415
  1. import 'package:flutter_2048/reducers/updateState.dart';
  2. import './moveDown.dart';
  3. import './moveLeft.dart';
  4. import './moveRight.dart';
  5. import './moveUp.dart';
  6. import '../store/game_state.dart';
  7. import 'package:redux/redux.dart';
  8. final gameReducer = combineReducers<GameState>([
  9. TypedReducer<GameState, UpdateStateAction>(updateState),
  10. TypedReducer<GameState, MoveLeftAction>(moveLeft),
  11. TypedReducer<GameState, MoveRightAction>(moveRight),
  12. TypedReducer<GameState, MoveUpAction>(moveUp),
  13. TypedReducer<GameState, MoveDownAction>(moveDown),
  14. ]);