@@ -104,7 +104,7 @@ Slot shift(Slot oldPos, int maxRows) {
104
104
105
105
if (oldCol < 9 && oldRow == maxRows ) {
106
106
oldCol ++;
107
- oldRow = 0 ;
107
+ oldRow = 1 ;
108
108
} else {
109
109
oldRow ++;
110
110
}
@@ -117,8 +117,8 @@ Slot shift(Slot oldPos, int maxRows) {
117
117
118
118
@ Override
119
119
Slot shift (Slot oldPos , int maxRows ) {
120
- int row = oldPos .getRow ();
121
- if (row < 0 ) {
120
+ int row = oldPos .getRow () + 1 ;
121
+ if (row < 1 ) {
122
122
row = oldPos .getRow ();
123
123
}
124
124
return new Slot (row , oldPos .getColumn ());
@@ -128,9 +128,9 @@ Slot shift(Slot oldPos, int maxRows) {
128
128
DOWNWARDS_ONLY {
129
129
@ Override
130
130
Slot shift (Slot oldPos , int maxRows ) {
131
- int row = oldPos .getRow ()+ 1 ;
132
- if (row > maxRows ) {
133
- row = oldPos . getRow () ;
131
+ int row = oldPos .getRow () + 1 ;
132
+ if (row > maxRows ) {
133
+ row = 6 ;
134
134
}
135
135
return new Slot (row , oldPos .getColumn ());
136
136
}
@@ -140,21 +140,21 @@ Slot shift(Slot oldPos, int maxRows) {
140
140
RIGHT_ONLY {
141
141
@ Override
142
142
Slot shift (Slot oldPos , int maxRows ) {
143
- int col = oldPos .getColumn ()+ 1 ;
144
- if (col > 8 ) {
145
- col = oldPos . getColumn () ;
143
+ int col = oldPos .getColumn () + 1 ;
144
+ if (col > 9 ) {
145
+ col = 9 ;
146
146
}
147
147
return new Slot (oldPos .getRow (), col );
148
148
}
149
149
},
150
150
151
151
152
- LEFT_ONLY {
152
+ LEFT_ONLY {
153
153
@ Override
154
154
Slot shift (Slot oldPos , int maxRows ) {
155
- int col = oldPos .getColumn ()- 1 ;
156
- if (col < 0 ) {
157
- col = oldPos . getColumn () ;
155
+ int col = oldPos .getColumn () - 1 ;
156
+ if (col < 1 ) {
157
+ col = 1 ;
158
158
}
159
159
return new Slot (oldPos .getRow (), col );
160
160
}
0 commit comments