Skip to content

Instantly share code, notes, and snippets.

Avatar

Julien Poulton CGjupoulton

View GitHub Profile
View CR_kotlinStarterAI.kt
import kotlin.math.*
import java.util.*
data class Coord(val x: Int, val y: Int) {
constructor(input: Scanner) : this(input.nextInt(), input.nextInt())
operator fun plus(other: Coord): Coord {
@CGjupoulton
CGjupoulton / CR_Starter.py
Last active Sep 23, 2022
Crystal Rush - Python3 Starter
View CR_Starter.py
import sys
import math
# Deliver more amadeusium to hq (left side of the map) than your opponent. Use radars to find amadeusium but beware of traps!
# height: size of the map
width, height = [int(i) for i in input().split()]
NONE = -1
ROBOT_ALLY = 0
@CGjupoulton
CGjupoulton / CR_Starter.js
Last active Sep 23, 2022
Crystal Rush - JavaScript Starter
View CR_Starter.js
/**
* Deliver more ore to hq (left side of the map) than your opponent. Use radars to find ore but beware of traps!
**/
let inputs = readline().split(' ');
const MAP_WIDTH = parseInt(inputs[0]);
const MAP_HEIGHT = parseInt(inputs[1]); // size of the map
const NONE = -1;
const ROBOT_ALLY = 0;
const ROBOT_ENEMY = 1;
@CGjupoulton
CGjupoulton / CR_Starter.java
Last active Sep 23, 2022
Crystal Rush - Java Starter
View CR_Starter.java
import static java.lang.Math.*;
import java.io.*;
import java.nio.*;
import java.util.*;
class Coord {
final int x;
final int y;
@CGjupoulton
CGjupoulton / CR_Starter.cs
Last active Sep 23, 2022
Crystal Rush - C# Starter
View CR_Starter.cs
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
enum EntityType
{
@CGjupoulton
CGjupoulton / CR_Starter.cpp
Last active Sep 23, 2022
Crystal Rush - C++ Starter
View CR_Starter.cpp
#include <array>
#include <cassert>
#include <iostream>
#include <vector>
using namespace std;
//********************************* UTILS **********************************************
//----------------------------------Point----------------------------------------------------------