Skip to content

Commit 1a3fe84

Browse files
committed
final version because of covid-19
1 parent 48b2331 commit 1a3fe84

File tree

7 files changed

+742
-351
lines changed

7 files changed

+742
-351
lines changed

DPMProject/src/ca/mcgill/ecse211/project/GameParameters.java

Lines changed: 269 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public class GameParameters {
2626
*/
2727
private static int origin_UR_y;
2828

29-
3029
/**
3130
* Island lower left x position
3231
*/
@@ -47,7 +46,6 @@ public class GameParameters {
4746
*/
4847
private static int Island_UR_y;
4948

50-
5149
/**
5250
* Tunnel lower left x position
5351
*/
@@ -111,7 +109,6 @@ public class GameParameters {
111109
* This method set up the important parameters
112110
*/
113111
public static void setUp() {
114-
//We first check if we are going left, right, bottom or up to reach island
115112
//Set up the corner
116113
if(origin_UR_x == MAX_X && origin_UR_y == MAX_Y) {
117114
Corner_x = MAX_X;
@@ -177,7 +174,7 @@ else if(direction.equals("RIGHT")) {
177174
*/
178175
public static double[] getTunnelEntranceAndExitPosition() {
179176
double[] position = new double[4];
180-
177+
181178
if(direction.equals("UP")) {
182179
position[0] = TN_ENTRY_x;
183180
position[1] = TN_ENTRY_y - 1;
@@ -217,4 +214,272 @@ public static int[] getReturnPosition() {
217214
return position;
218215
}
219216

217+
/**
218+
* @return the initial_x
219+
*/
220+
public static int getInitial_x() {
221+
return Initial_x;
222+
}
223+
224+
/**
225+
* @return the initial_y
226+
*/
227+
public static int getInitial_y() {
228+
return Initial_y;
229+
}
230+
231+
/**
232+
* @return the origin_LL_x
233+
*/
234+
public static int getOrigin_LL_x() {
235+
return origin_LL_x;
236+
}
237+
238+
/**
239+
* @param origin_LL_x the origin_LL_x to set
240+
*/
241+
public static void setOrigin_LL_x(int origin_LL_x) {
242+
GameParameters.origin_LL_x = origin_LL_x;
243+
}
244+
245+
/**
246+
* @return the origin_LL_y
247+
*/
248+
public static int getOrigin_LL_y() {
249+
return origin_LL_y;
250+
}
251+
252+
/**
253+
* @param origin_LL_y the origin_LL_y to set
254+
*/
255+
public static void setOrigin_LL_y(int origin_LL_y) {
256+
GameParameters.origin_LL_y = origin_LL_y;
257+
}
258+
259+
/**
260+
* @return the origin_UR_x
261+
*/
262+
public static int getOrigin_UR_x() {
263+
return origin_UR_x;
264+
}
265+
266+
/**
267+
* @param origin_UR_x the origin_UR_x to set
268+
*/
269+
public static void setOrigin_UR_x(int origin_UR_x) {
270+
GameParameters.origin_UR_x = origin_UR_x;
271+
}
272+
273+
/**
274+
* @return the origin_UR_y
275+
*/
276+
public static int getOrigin_UR_y() {
277+
return origin_UR_y;
278+
}
279+
280+
/**
281+
* @param origin_UR_y the origin_UR_y to set
282+
*/
283+
public static void setOrigin_UR_y(int origin_UR_y) {
284+
GameParameters.origin_UR_y = origin_UR_y;
285+
}
286+
287+
/**
288+
* @return the island_LL_x
289+
*/
290+
public static int getIsland_LL_x() {
291+
return Island_LL_x;
292+
}
293+
294+
/**
295+
* @param island_LL_x the island_LL_x to set
296+
*/
297+
public static void setIsland_LL_x(int island_LL_x) {
298+
Island_LL_x = island_LL_x;
299+
}
300+
301+
/**
302+
* @return the island_LL_y
303+
*/
304+
public static int getIsland_LL_y() {
305+
return Island_LL_y;
306+
}
307+
308+
/**
309+
* @param island_LL_y the island_LL_y to set
310+
*/
311+
public static void setIsland_LL_y(int island_LL_y) {
312+
Island_LL_y = island_LL_y;
313+
}
314+
315+
/**
316+
* @return the island_UR_x
317+
*/
318+
public static int getIsland_UR_x() {
319+
return Island_UR_x;
320+
}
321+
322+
/**
323+
* @param island_UR_x the island_UR_x to set
324+
*/
325+
public static void setIsland_UR_x(int island_UR_x) {
326+
Island_UR_x = island_UR_x;
327+
}
328+
329+
/**
330+
* @return the island_UR_y
331+
*/
332+
public static int getIsland_UR_y() {
333+
return Island_UR_y;
334+
}
335+
336+
/**
337+
* @param island_UR_y the island_UR_y to set
338+
*/
339+
public static void setIsland_UR_y(int island_UR_y) {
340+
Island_UR_y = island_UR_y;
341+
}
342+
343+
/**
344+
* @return the tN_LL_x
345+
*/
346+
public static int getTN_LL_x() {
347+
return TN_LL_x;
348+
}
349+
350+
/**
351+
* @param tN_LL_x the tN_LL_x to set
352+
*/
353+
public static void setTN_LL_x(int tN_LL_x) {
354+
TN_LL_x = tN_LL_x;
355+
}
356+
357+
/**
358+
* @return the tN_LL_y
359+
*/
360+
public static int getTN_LL_y() {
361+
return TN_LL_y;
362+
}
363+
364+
/**
365+
* @param tN_LL_y the tN_LL_y to set
366+
*/
367+
public static void setTN_LL_y(int tN_LL_y) {
368+
TN_LL_y = tN_LL_y;
369+
}
370+
371+
/**
372+
* @return the tN_UR_x
373+
*/
374+
public static int getTN_UR_x() {
375+
return TN_UR_x;
376+
}
377+
378+
/**
379+
* @param tN_UR_x the tN_UR_x to set
380+
*/
381+
public static void setTN_UR_x(int tN_UR_x) {
382+
TN_UR_x = tN_UR_x;
383+
}
384+
385+
/**
386+
* @return the tN_UR_y
387+
*/
388+
public static int getTN_UR_y() {
389+
return TN_UR_y;
390+
}
391+
392+
/**
393+
* @param tN_UR_y the tN_UR_y to set
394+
*/
395+
public static void setTN_UR_y(int tN_UR_y) {
396+
TN_UR_y = tN_UR_y;
397+
}
398+
399+
/**
400+
* @return the corner_x
401+
*/
402+
public static int getCorner_x() {
403+
return Corner_x;
404+
}
405+
406+
/**
407+
* @param corner_x the corner_x to set
408+
*/
409+
public static void setCorner_x(int corner_x) {
410+
Corner_x = corner_x;
411+
}
412+
413+
/**
414+
* @return the corner_y
415+
*/
416+
public static int getCorner_y() {
417+
return Corner_y;
418+
}
419+
420+
/**
421+
* @param corner_y the corner_y to set
422+
*/
423+
public static void setCorner_y(int corner_y) {
424+
Corner_y = corner_y;
425+
}
426+
427+
/**
428+
* @return the tN_ENTRY_x
429+
*/
430+
public static double getTN_ENTRY_x() {
431+
return TN_ENTRY_x;
432+
}
433+
434+
/**
435+
* @param tN_ENTRY_x the tN_ENTRY_x to set
436+
*/
437+
public static void setTN_ENTRY_x(double tN_ENTRY_x) {
438+
TN_ENTRY_x = tN_ENTRY_x;
439+
}
440+
441+
/**
442+
* @return the tN_ENTRY_y
443+
*/
444+
public static double getTN_ENTRY_y() {
445+
return TN_ENTRY_y;
446+
}
447+
448+
/**
449+
* @param tN_ENTRY_y the tN_ENTRY_y to set
450+
*/
451+
public static void setTN_ENTRY_y(double tN_ENTRY_y) {
452+
TN_ENTRY_y = tN_ENTRY_y;
453+
}
454+
455+
/**
456+
* @return the direction
457+
*/
458+
public static String getDirection() {
459+
return direction;
460+
}
461+
462+
/**
463+
* @param direction the direction to set
464+
*/
465+
public static void setDirection(String direction) {
466+
GameParameters.direction = direction;
467+
}
468+
469+
/**
470+
* @param initial_x the initial_x to set
471+
*/
472+
public static void setInitial_x(int initial_x) {
473+
Initial_x = initial_x;
474+
}
475+
476+
/**
477+
* @param initial_y the initial_y to set
478+
*/
479+
public static void setInitial_y(int initial_y) {
480+
Initial_y = initial_y;
481+
}
482+
483+
484+
220485
}

0 commit comments

Comments
 (0)