Skip to content

Instantly share code, notes, and snippets.

@e-tverdokhleb
e-tverdokhleb / MainActivity.kt
Created September 30, 2021 14:38
TASK_EQUALS
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
const val t = "TEST"
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
0x1204f318a6b87d530ca2f6646ac0f489d2dcfce9
/*
* Copyright (c) 2014 kademika.com
*/
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.util.Random;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class BattleFieldTemplate extends JPanel {
boolean COLORDED_MODE = true;
int desk_step = 64;
int tank_move_step = 7;
long tank_speed = 500;
int tankX = 0;
int tankY = 0;
void runTheGame() throws Exception {
moveRandom();
public class Main {
public static void main(String[] args) {
printNumbers(1,133);
}
static void printNumbers(int i, int n) {
while(i < n){
n++;
i =n +1;
System.out.println("n: "+n + "\ni: "+i);
static void start(int number) {
if (number <= 0) {
System.out.println("Start falied");
return;
}
for (int i = number; i >= 0; i--) {
System.out.println(i);
}
System.out.println("Go!");
void runTheGame() throws Exception {
move(2);
move(2);
move(2);
move(1);
move(4);
move(4);
move(3);
}
void runTheGame() throws Exception {
int direction = 1;
while (true) {
if (direction == 1) {
if ((tankX + tank_move_step) >= (BF_WIDTH - desk_step)) {
tankX = 512;
direction = 0;
} else {
tankX += tank_move_step;
}
public class Temp {
public static void main(String[] args) {
int i = 1;
while (i <= 10) {
System.out.println(i);
if (i <= 10) {
i++;
continue;
}
break;
public class Temp {
public static void main(String[] args) {
int i=1;
while (true){
System.out.println(i);
i++;
if (i > 10){
break;
}
}