forked from cpe200-161/twofourzeroeight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TwoZeroFourEightController.cs
44 lines (39 loc) · 1.03 KB
/
TwoZeroFourEightController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace twozerofoureight
{
class TwoZeroFourEightController : Controller
{
public const int LEFT = 0;
public const int RIGHT = 1;
public const int UP = 2;
public const int DOWN = 3;
public TwoZeroFourEightController()
{
}
public override void ActionPerformed(int action)
{
foreach (TwoZeroFourEightModel m in mList)
{
switch (action)
{
case LEFT:
m.PerformLeft();
break;
case RIGHT:
m.PerformRight();
break;
case UP:
m.PerformUp();
break;
case DOWN:
m.PerformDown();
break;
}
}
}
}
}