Code Monkey home page Code Monkey logo

2019_elegant's Introduction

Die Ants

Build Status

This project is a game in which you set parameters for simulating ants.

2019_elegant's People

Contributors

cebudding avatar ebohorqu avatar furtheradu avatar gabelstein avatar hyma2194 avatar lukas-braun avatar luxoar avatar marcbue avatar owenmackwood avatar parvn avatar rez-k avatar safamalkawi avatar ssnio avatar zainab-mohamed avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

2019_elegant's Issues

Color and Name in Player mixed

Player are created with (name, color). Currently, the name gets assigned a color and vice versa. I think it occurs in start_button_pressed in controller/controller.

Refractor View

TBD:

  • Docstrings for every method
  • Delete commented code (add #TODO if commented code is related to an issue/feature you work on)
  • More tests

How to do timers?

We probably have to do a lot of timers. How should we implement this. Look at Safas' Code and maybe do a seperate function for that.

Game gets slow when more than 15 ants are created

Already done multithreading in the kd_tree for the methods that directly operate on the tree.
To see how long methods take to run, either run

  • python -m cProfile main.py on the shell
  • replace controller.game_loop() in main.py with cProfile.run('controller.game_loop()')

To interpret columns, see https://docs.python.org/3/library/profile.html:

  • ncalls for the number of calls.
  • tottime for the total time spent in the given function (and excluding time made in calls to sub-functions)
  • percall is the quotient of tottime divided by ncalls cumtime is the cumulative time spent in this and all subfunctions (from invocation till exit). This figure is accurate even for recursive functions.
  • cumtime is the cumulative time spent in this and all subfunctions (from invocation till exit). This figure is accurate even for recursive functions.

Attention to k objects

As Rosa mentioned: What if there are many objects in equally distance distance that get returned from the get_k_nearest_neighbours? (Implementation now will return more than k objects, but ants should also not be able to process infinite amount of objects).

Idea:
Ants have a new variable self.k_objects_processable -> When they get objects in their surrounding, they are only able to process k objects. Thus, when they are given objects in their surrounding, it would make sense to 'process' them in a way that only k get noticed. This could also involve assigning priority (e.g., enemies first, then food, then pheromones).

Ants inactivate themselves

Initially they inactivated themselves at the nest after delivering food, but currently they deactivate themselves at the position where they found the food.

Ants disappearing

Sometimes Ants simply disappear.
Is this due to the ants dying and getting there position deleted?

Create Ant Button not in sync

Currently if pressing the create ant button a circle for the waiting time is created. This is not in sync though with the creation of the ants.
The circle is completed and the ant counter increases but the ant is created later. This is I think due to the timing set explicitly in the create ant function in controller.

Quit button access in controller

Hey everyone,

In the implemented full-screen mode of our game, a crucial component is the quit button(the normal option buttons wont be visible anymore). Since the controller receives the event of a click, we (View team) would like to request for implementing the same. P.S: We could implement this by calling the quit button via its ID (quit_button) using the function (get_element_by_id) and then implement the system quit option. This needs to be implemented both in the game view and in the start view.
Kindly DO NOT run the view without implementing this function as none of the other operating systems but Windows have an option to quit from the game.

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.