Giter VIP home page Giter VIP logo

karel's People

Contributors

alts avatar tetragramm avatar xsebek avatar

Stargazers

 avatar  avatar

karel's Issues

Windows support

There are a few issues that need to be fixed for Karel to run on Windows:

  • use windows-curses as python does not include them by default
    • this should not affect other platforms
  • use UTF8 when opening files (also not default on Win)
  • GH Actions: Windows uses ` instead of \ as line continuation in shell, so use neither

Interactive history

For educational purposes, it would be great to go back and forward in history.
Viewing of history is the main feature of "just printing to terminal" missing here with curses.

A "simple" solution could be to create a list of (pairs of) actions to go (forward and) backward.

Issue when running Karel

Hey,

I got this exception when trying to run your code using Python 3.9:

Exception unrelated to screen was raised:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/startup.py", line 47, in try_end_window
    endwin()
_curses.error: must call initscr() first

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Users/Michal/PycharmProjects/pythonProject/main.py", line 1, in <module>
    from karel_robot.run import *
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/__init__.py", line 23, in <module>
    from .main import *
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/main.py", line 131, in <module>
    from .interactive import *
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/interactive.py", line 4, in <module>
    from .functions import *
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/functions.py", line 7, in <module>
    window: Window = setup_window(cli_args=argv)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/startup.py", line 96, in setup_window
    try_end_window(exception=e)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/startup.py", line 50, in try_end_window
    raise exception
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/run/startup.py", line 79, in setup_window
    window_opt = Window(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/karel_robot/window.py", line 109, in __init__
    self.screen = curses.initscr()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/curses/__init__.py", line 29, in initscr
    setupterm(term=_os.environ.get("TERM", "unknown"),
_curses.error: setupterm: could not find terminal

Python 3.6 is not sufficient

The setup.py specifies that the minimal required version of Python is 3.6.

However, with Python 3.6, Karel does not work due to from __future__ import annotations. The actual minimal required version is 3.7.

Make the alerts more visible

The message line is easy to overlook at the bottom of the window.

Possible improvements:

  • use bold
  • use better colours
  • invert colours to blink

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.