-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
156 changed files
with
8,518 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
40 changes: 40 additions & 0 deletions
40
...metadata/.plugins/org.eclipse.core.resources/.history/12/501fa6eaa4f8001713a4bbabc0b5190c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package robotti; | ||
|
||
import lejos.nxt.*; | ||
|
||
/** | ||
* Example leJOS Project with an ant build file | ||
* | ||
*/ | ||
|
||
public class Robotti { | ||
|
||
//alas = A forward | ||
//vasemmalle = B forward | ||
//taakse = C forward | ||
|
||
//lähtöpaikka NXT:n vieressa! | ||
|
||
public static void main(String[] args) { | ||
Piirturi piirturi = new Piirturi(); | ||
|
||
//piirturi.vapaaPiirtaminen(); | ||
//piirturi.ympyraTesti(); | ||
//piirturi.asetaKorkeus(); | ||
//piirturi.vapaaPiirtaminen(false); | ||
//piirturi.piirraViiva(100, 100, 500, 800); | ||
//piirturi.piirraViiva(100, 200, 400, 300); | ||
//piirturi.nollaaRobotti(); | ||
|
||
piirturi.asetaKorkeus(false); | ||
/* | ||
Pelaaja pelaaja1 = new Ihmispelaaja(1); | ||
Pelaaja pelaaja2 = new Ihmispelaaja(2); | ||
|
||
Ristinolla peli = new Ristinolla(pelaaja1, pelaaja2); | ||
peli.aloita(); | ||
Button.ENTER.waitForPressAndRelease(); | ||
*/ | ||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
...metadata/.plugins/org.eclipse.core.resources/.history/16/6023786495f800171105c7e6ce99e9f4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package robotti; | ||
|
||
import lejos.nxt.*; | ||
|
||
/** | ||
* Example leJOS Project with an ant build file | ||
* | ||
*/ | ||
|
||
public class Robotti { | ||
|
||
//alas = A forward | ||
//vasemmalle = B forward | ||
//taakse = C forward | ||
|
||
//lähtöpaikka NXT:n vieressa! | ||
|
||
public static void main(String[] args) { | ||
//Piirturi piirturi = new Piirturi(); | ||
|
||
//piirturi.vapaaPiirtaminen(); | ||
//piirturi.ympyraTesti(); | ||
//piirturi.asetaKorkeus(); | ||
//piirturi.vapaaPiirtaminen(); | ||
//piirturi.piirraViiva(100, 100, 500, 800); | ||
//piirturi.piirraViiva(100, 200, 400, 300); | ||
//piirturi.nollaaRobotti(); | ||
|
||
Pelaaja pelaaja1 = new Ihmispelaaja(1); | ||
Pelaaja pelaaja2 = new Ihmispelaaja(2); | ||
|
||
Ristinolla peli = new Ristinolla(pelaaja1, pelaaja2); | ||
peli.aloita(); | ||
pelaaja1.pelaa(peli.getRuudukko()); | ||
Button.ENTER.waitForPressAndRelease(); | ||
|
||
|
||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
...metadata/.plugins/org.eclipse.core.resources/.history/18/70b205c18ef800171105c7e6ce99e9f4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package robotti; | ||
|
||
public class Ristinollapiirturi { | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
...metadata/.plugins/org.eclipse.core.resources/.history/18/b0b32c5092f800171105c7e6ce99e9f4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package robotti; | ||
|
||
import lejos.nxt.*; | ||
|
||
/** | ||
* Example leJOS Project with an ant build file | ||
* | ||
*/ | ||
|
||
public class Robotti { | ||
|
||
//alas = A forward | ||
//vasemmalle = B forward | ||
//taakse = C forward | ||
|
||
//lähtöpaikka NXT:n vieressa! | ||
|
||
public static void main(String[] args) { | ||
//Piirturi piirturi = new Piirturi(); | ||
|
||
//piirturi.vapaaPiirtaminen(); | ||
//piirturi.ympyraTesti(); | ||
//piirturi.asetaKorkeus(); | ||
//piirturi.vapaaPiirtaminen(); | ||
//piirturi.piirraViiva(100, 100, 500, 800); | ||
//piirturi.piirraViiva(100, 200, 400, 300); | ||
//piirturi.nollaaRobotti(); | ||
|
||
Pelaaja pelaaja1 = new Ihmispelaaja(1); | ||
Pelaaja pelaaja2 = new Satunnaispelaaja(2); | ||
|
||
Ristinolla peli = new Ristinolla(pelaaja1, pelaaja2); | ||
|
||
pelaaja1.pelaa(peli.getRuudukko()); | ||
//Ristinolla.aloita(); | ||
|
||
|
||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...metadata/.plugins/org.eclipse.core.resources/.history/19/8022eef78ff800171105c7e6ce99e9f4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package robotti; | ||
|
||
import java.util.ArrayList; | ||
|
||
import lejos.nxt.Motor; | ||
import lejos.nxt.SensorPort; | ||
import lejos.nxt.SensorPortListener; | ||
import lejos.nxt.TouchSensor; | ||
|
||
public class Ihmispelaaja implements Pelaaja { | ||
|
||
private int pelaaja; | ||
|
||
public Ihmispelaaja(int pelaaja) { | ||
this.pelaaja = pelaaja; | ||
} | ||
|
||
public int pelaa(ArrayList<Integer> ruudukko) { | ||
System.out.println("Valitse pelattava"); | ||
System.out.println("ruutu ja paina"); | ||
System.out.println("enter"); | ||
|
||
System.out.println(ruudukko); | ||
|
||
return 1; | ||
} | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
...metadata/.plugins/org.eclipse.core.resources/.history/1b/90a8741592f800171105c7e6ce99e9f4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package robotti; | ||
|
||
import java.util.ArrayList; | ||
|
||
import lejos.nxt.Button; | ||
import lejos.nxt.ButtonListener; | ||
import lejos.nxt.LCD; | ||
import lejos.nxt.Motor; | ||
import lejos.nxt.SensorPort; | ||
import lejos.nxt.SensorPortListener; | ||
import lejos.nxt.TouchSensor; | ||
|
||
public class Ihmispelaaja implements Pelaaja { | ||
|
||
private int pelaaja; | ||
|
||
public Ihmispelaaja(int pelaaja) { | ||
this.pelaaja = pelaaja; | ||
} | ||
|
||
public int pelaa(ArrayList<Integer> ruudukko) { | ||
System.out.println("Valitse pelattava"); | ||
System.out.println("ruutu ja paina"); | ||
System.out.println("enter"); | ||
|
||
System.out.println(); | ||
|
||
final int indeksi = 0; | ||
|
||
Button.RIGHT.addButtonListener(new ButtonListener() { | ||
public void buttonPressed(Button b) { | ||
lisaa(indeksi); | ||
|
||
LCD.clear(); | ||
System.out.println("Valitse pelattava"); | ||
System.out.println("ruutu ja paina"); | ||
System.out.println("enter"); | ||
|
||
System.out.println(indeksi); | ||
} | ||
|
||
public void buttonReleased(Button b) { | ||
|
||
} | ||
}); | ||
|
||
Button.ENTER.waitForPressAndRelease(); | ||
return 1; | ||
|
||
} | ||
|
||
public void lisaa(int indeksi) { | ||
indeksi++; | ||
} | ||
|
||
} |
Oops, something went wrong.