Skip to content

Instantly share code, notes, and snippets.

@AngelVI13
AngelVI13 / xml.zig
Last active June 11, 2023 11:22 — forked from Snektron/xml.zig
Zig xml parser (works with 0.10.1)
const std = @import("std");
const mem = std.mem;
const testing = std.testing;
const Allocator = mem.Allocator;
const ArenaAllocator = std.heap.ArenaAllocator;
const SegmentedList = std.SegmentedList;
pub const Attribute = struct {
name: []const u8,
value: []const u8
@AngelVI13
AngelVI13 / game.py
Created March 27, 2020 14:14
Dice game advanced
import random
import time
class DiceGame:
ROLL_WAIT_TIME = 3
def __init__(self, rounds):
self.rounds = rounds
self.player1_score = 0
@AngelVI13
AngelVI13 / game.py
Created March 27, 2020 13:59
Dice game gist
import random
import time
# Note: rolling variable is not changed anywhere else -> its not doing anything - remove it
rolling = True
rounds = 2
round_count = 0
player1_score = 0
player2_score = 0