This file contains hidden or 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 IgorDolgov.wareHome; | |
| import java.util.ArrayList; | |
| import java.util.Calendar; | |
| import java.util.Random; | |
| import java.util.Scanner; | |
| public class Main { |
This file contains hidden or 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 IgorDolgov.wareHome; | |
| import java.util.ArrayList; | |
| import java.util.Calendar; | |
| import java.util.Random; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args) { |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class Battleship { | |
| static String player1 = "Player1"; | |
| static String player2 = "Player1"; | |
| static Scanner sc = new Scanner(System.in); | |
| static int[][] field1 = new int[10][10]; | |
| static int[][] field2 = new int[10][10]; | |
| static int[][] monitor1 = new int[10][10]; |
This file contains hidden or 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 IgorDolgov.arraylist; | |
| import java.util.ArrayList; | |
| public class Main { | |
| static class Person { | |
| String name; |
This file contains hidden or 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 tictactoe; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| public class TicTac { | |
| // Игровое поле | |
| public static char[][] field = |
This file contains hidden or 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 IgorDolgov.wareHome; | |
| import java.util.ArrayList; | |
| import java.util.Calendar; | |
| import java.util.Random; | |
| import java.util.Scanner; | |
| //class Thing{ |
This file contains hidden or 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 IgorDolgov.cats; | |
| import java.util.Calendar; | |
| import java.util.Random; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции |
This file contains hidden or 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 IgorDolgov.cats; | |
| import java.util.Calendar; | |
| import java.util.Random; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции |
This file contains hidden or 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 IgorDolgov.cats; | |
| import java.util.Random; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции | |
| // System.out.println("Кошка съела из тарелки " + portion); |
This file contains hidden or 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 IgorDolgov.cats; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции | |
| // System.out.println("Кошка съела из тарелки " + portion); | |
| // System.out.println("Кошка всего съела " + consumed); | |
| // } |