Git Product home page Git Product logo

foxford_2018's People

Contributors

tkhirianov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

foxford_2018's Issues

[vne_ege] Добавлять шарики прямо во время игры.

Хочется добавлять шарики прямо во время игры, и сложность игры в связи с этим со временем усложнялась.

Варианты реализации:

  1. тупо по таймеру
  2. когда шарик сталкивается со стеной он "раскалывается" (с некоторой вероятностью)

[vne_ege] Сделать шарики кликабельными

Нужно сделать шарики "кликабельными".

Т.е. по клику на холст обнаруживать нужный шарик и удалять его, запуская для него ball_delete(ball).

Старый код функции-прототипа обработки клика:

# FIXME: исправить отработку клика
"""
def click_handler(event):
    global x, y, r, scores_text, scores
    print(event.x, event.y)
    if oval_id is not None:
        if ((event.x - x)**2 + (event.y - y)**2) <= r**2:
            print("Попал!")
            scores += 100
            scores_text["text"] = "Ваши очки: " + str(scores)
            r = randint(10, 30)
            x = randint(0+r, 639-r)
            y = randint(0+r, 479-r)
            canvas.coords(oval_id, (x-r, y-r, x+r, y+r))
"""

Привязка события в программе-прототипе:

# FIXME: вернуть кликабельность шариков
# canvas.bind("<Button>", click_handler)

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.