Skip to content

Instantly share code, notes, and snippets.

View tosho's full-sized avatar

Tosho tosho

  • Bulgaria
  • 12:13 (UTC +03:00)
View GitHub Profile
@tosho
tosho / GDScriptCamera.gd
Created March 21, 2018 20:45 — forked from nosh247/GDScriptCamera.gd
Zelda like camera movement - Godot 3.0
extends Camera2D
onready var window_size = Vector2(320,240)#OS.get_window_size()
onready var player = get_parent().get_node("Player")
onready var player_world_pos = get_player_world_pos()
onready var new_player_grid_pos = Vector2()
onready var tweenStart = false
onready var tween = get_node("Tween")
onready var new_cam_pos = Vector2()
Verifying my Blockstack ID is secured with the address 1KTfV3kbEToVheE4ooHWBtiSpzvFXXXRvN https://explorer.blockstack.org/address/1KTfV3kbEToVheE4ooHWBtiSpzvFXXXRvN
@tosho
tosho / game_of_bottles.py
Created October 7, 2016 20:41
Game of bottles
def game_of_bottles(n):
@tosho
tosho / strings_and_numbers.py
Last active October 7, 2016 20:21
Strings and Numbers
s = r"bbcccddddeeeeeffffffggggggghhhhhhhhiiiiiiiiijjjjjjjjjja"
#s = "bbbcccddddeeeee*****f####fffffggggggghhhhhhhhii!!!!!!iiiiiiijjjjjjjjjja"
answer = "1122233334444455555566666667777777788888888899999999990"
def strings_and_numbers(s):
s = list(s)
result = s
@tosho
tosho / heads_and_tails.py
Created October 7, 2016 20:19
Heads and Tails
n = input('enter "H" or "T": ')
if n.count('H') > n.count('T'):
print('H wins!')
elif n.count('H') < n.count('T'):
print('T wins!')
else:
print('Draw!')