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
class TicTacToeModel { | |
enum class Players { | |
None, P1, P2 | |
} | |
private lateinit var board: Array<Array<Players>> | |
private var _winsP1 = 0 | |
private var _winsP2 = 0 | |
private var _currentPlayer = Players.None | |
private var _ctrl = 9 |
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
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
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
package pt.isec.pa.pong.ui; | |
import javafx.application.Platform; | |
import javafx.beans.property.BooleanProperty; | |
import javafx.beans.property.SimpleBooleanProperty; | |
import javafx.event.ActionEvent; | |
import javafx.fxml.Initializable; | |
import javafx.scene.control.Button; | |
import javafx.scene.layout.HBox; | |
import pt.isec.pa.pong.model.Game; |
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
package pt.isec.pa.pong.ui; | |
import javafx.application.Platform; | |
import javafx.beans.property.BooleanProperty; | |
import javafx.beans.property.SimpleBooleanProperty; | |
import pt.isec.pa.pong.model.Game; | |
class CommandsViewModel { | |
Game game; |
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
10,15 | |
E,4,5 | |
v,2,2 | |
E,0,0 | |
E,9,9 | |
E,0,14 | |
v,1,0 | |
E,2,0 | |
E,2,1 | |
E,1,1 |
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
public interface IFleet { | |
boolean addVehicle(Vehicle vehicle); | |
boolean removeVehicle(String licencePlate); | |
String getName(); | |
String toStringSortByNumberOfPassengers(); | |
String toStringSortByMaxLoad(); |
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
public class FleetUI { | |
private final String licensePlateRegex = "[0-9]{2}[\\s-]{0,1}[0-9]{2}[\\s-]{0,1}[A-IK-PR-VZ]{2}|[0-9]{2}[\\s-]{0,1}[A-IK-PR-VZ]{2}[\\s-]{0,1}[0-9]{2}|[A-IK-PR-WYZ]{2}[\\s-]{0,1}[0-9]{2}[\\s-]{0,1}[A-IK-PR-WYZ]{2}"; | |
final IFleet fleet; | |
final Scanner scr; | |
public FleetUI(IFleet fleet) { | |
this.fleet = fleet; |
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
package pt.isec.pa.utils; | |
import java.util.Scanner; | |
public final class PAInput { | |
private PAInput() {} | |
private static Scanner sc; | |
static { |
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
public class SomaParInteiros | |
{ | |
public static void main(String args[]) | |
{ | |
int i1, i2; | |
System.out.println(); | |
if(args.length != 2){ | |
System.out.println("Devem ser indicados 2 parâmetros inteiros!"); |
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
public class ParInteiros { | |
private int i1, i2; | |
public ParInteiros(int i1, int i2) { | |
this.i1 = i1; | |
this.i2 = i2; | |
} | |
public int getI1() { | |
return i1; |
NewerOlder