Skip to content

Instantly share code, notes, and snippets.

View CGjupoulton's full-sized avatar

Julien Poulton CGjupoulton

View GitHub Profile
@CGjupoulton
CGjupoulton / CR_Starter.cpp
Last active September 23, 2022 08:54
Crystal Rush - C++ Starter
#include <array>
#include <cassert>
#include <iostream>
#include <vector>
using namespace std;
//********************************* UTILS **********************************************
//----------------------------------Point----------------------------------------------------------
@CGjupoulton
CGjupoulton / CR_Starter.cs
Last active September 23, 2022 08:54
Crystal Rush - C# Starter
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
enum EntityType
{
@CGjupoulton
CGjupoulton / CR_Starter.java
Last active September 23, 2022 08:54
Crystal Rush - Java Starter
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.js
Last active September 23, 2022 08:53
Crystal Rush - JavaScript Starter
/**
* 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;
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 September 23, 2022 08:53
Crystal Rush - Python3 Starter
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