Giter Site home page Giter Site logo

codingame's Introduction

Codingame Challenge Solutions

My solutions for various Codingame challenges. This repository aims to track my journey and share examples of solutions for learning purposes. It also comes with some tools that you can use in your own journey.

Using as a Template

You can use this repository as a template for your own Codingame solutions. To do so, click the "Use this template" button at the top of the repository page. This will create a new repository in your account with the same structure as this one. You can then launch the reset_repository script to remove all the solutions and reinitialize the directories.

Structure

The repository is structured as follows:

  • .cg_local_app (locally created by launch_cg_local_app, contains the CG Local Application)
  • src
    • clash (empty files for Clash of Code challenges, initialized by create_clash_files)
    • lab (available space for your experiments)
    • bot_programming (solutions for Bot Programming challenges)
    • codegolf (solutions for Code Golf challenges)
      • easy
      • medium
      • hard
      • expert
    • optimization (solutions for Optimization challenges)
    • puzzles (solutions for Puzzles)
      • easy
      • medium
      • hard
      • expert

Tools

  • languages.ini: A list of programming languages supported by Codingame. Enable/disable languages as needed.
  • create_clash_files: Creates empty files for Clash of Code.
  • get_random_language: Randomly selects a programming language.
  • launch_cg_local_app: Downloads (if necessary) and launches the latest version of the CG Local Application for coding solutions locally.
  • clean_files: Removes src files (Clash, Lab, Solutions, or Everything).
  • init_directories: Initializes the src directories.
  • reset_repository: Removes all src files and initializes the directories.

Requirements

General

  • Java Runtime Environment (JRE): Required for CG Local Application.
  • CG Local Extension: Needed for communicating with the CG Local Application.

Windows

  • PowerShell: For executing .ps1 scripts.

Linux/macOS

  • Bash: For executing .sh scripts.
  • curl: Needed by launch_cg_local_app.sh to fetch the latest app version.
  • jq: Required by launch_cg_local_app.sh for parsing JSON data.

Usage

  • Open your local IDE.
  • Launch the CG Local Application with launch_cg_local_app.
  • Configure it (prefer Use one file for all puzzles for Clashs, but not for other Challenges).
  • Select a challenge in the Codingame platform.
  • Choose a programming language (or let get_random_language decide).
  • Create a new file in the appropriate directory (or use the clash empty file).
  • From your browser, on the Codingame IDE, click on your Enable CG Local extension button.
  • You can now code locally and test/submit your solution in the Codingame platform.

Known Issues

Linux

java.awt.HeadlessException: No X11 DISPLAY variable was set, or no headful library support was found, but this program performed an operation which requires it

Due to a headless JRE. Uninstall your headless JRE and install a headfull JRE.

sudo apt remove openjdk-<version>-jre-headless
sudo apt install openjdk-<version>-jre

java: symbol lookup error: (...)/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE:

Due to VSCode taking over GTK_PATH. Should be fixed by .vscode/settings.json. If not you can always unset it manually.

unset GTK_PATH

codingame's People

Contributors

slgeay avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.