Wed Apr 17 01:05:42 PDT 2002
[netwalk.git] / dir_constant.e
blob6857439b9e2c08d279b16a0176de25abe00f3e13
1 deferred class DIR_CONSTANT
2 feature
3 dir_up : INTEGER is 1
4 dir_right : INTEGER is 2
5 dir_down : INTEGER is 3
6 dir_left : INTEGER is 4
8 dir_opposite(dir : INTEGER) : INTEGER is
9 do
10 inspect dir
11 when dir_up then
12 Result := dir_down
13 when dir_down then
14 Result := dir_up
15 when dir_left then
16 Result := dir_right
17 when dir_right then
18 Result := dir_left
19 end
20 end
21 end