GithubHelp home page GithubHelp logo

alexcercos / visualcgfunge Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 113 KB

Visual editor for CGFunge

Home Page: https://www.codingame.com/multiplayer/optimization/cgfunge-prime

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

visualcgfunge's Introduction

Visual CGFunge

Visual editor and batch runner for CGFunge Prime optimization game at CodinGame.

Dependencies

  • Python3
  • Pygame (for the visuals)
  • win32clipboard from pywin32 (to manage copy/pasting)
pip install pygame
pip install pywin32

In this current version, it may only be supported for windows (not tested in other operating systems).

Usage

Execute "visual_table.py", either from python idle or cmd.

Edit your code cell by cell or paste a raw text directly.

Run your code to find out which cells are visited by any validator or which validators fail (hover dark cells to review the cause of each failed validator).

Copy the resulting code to export it (paste it in a text file). Changes are not saved after exiting the program, to recover a previous session, copy again the resulting code and paste it again in the program.

See more details about how to use the program in the section below.

Controls

Mouse

  • Drag window border: resize screen.
  • Click: select grid cell.
  • Shift+click/drag mouse: multiple cell selection.
  • Hover cell: display extra information (character unicode, failed validators).
  • Scroll: displaces tooltip information while hovering a cell, if there are more lines.

Buttons

  • Copy: Copies all current code to clipboard.
  • Run: Executes each validator using the current code. Updates the score and cell shading.

Keyboard shortcuts

  • Arrow key: Selects next cell in that direction.
  • Ctrl+Z: undo last change.
  • Ctrl+Y: redo change.
  • Backspace: Clears selected cells (inserts space).
  • Escape: Deselects any active/selected cell.
  • Ctrl+Numbers: writes the character represented by that unicode, after releasing Ctrl key. For example, "Ctrl+1+0+0+release Ctrl" would write "d" (unicode=100).
  • Ctrl+Arrow key: Inserts an arrow (in CGFunge: "<>^v").
  • Ctrl+C: copies all selected cells (if any).
  • Ctrl+V: pastes the clipboard content in the grid, starting with the active cell (doesn't have any effect if no cell is selected).
  • Ctrl+Shift+C: copies all of the grid (as with "Copy" button).
  • Ctrl+Shift+V: pastes the clipboard content with the origin as reference (top-left corner).
  • Ctrl+Backspace: Clears all grid.
  • Ctrl+Enter: runs simulation (as with "Run" button).
  • Enter/Tab/Shift+Enter/Shift+Tab: has the same effect as arrow keys (enter=Up, tab=Right, shift=reverse).
  • Rest of keys: Inserts its corresponding letter in the active cell.

visualcgfunge's People

Contributors

alexcercos 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.