Yibo's Blog
  • Home
  • About
  • Gallery
  • GitHub
Sign in Subscribe

tips

A collection of 1 post
Writing Python the Rust Way
tips

Writing Python the Rust Way

UNO Card Game Implementation The Problem: A Naive Approach Let's start with a naive implementation of UNO card logic: class UnoCard: def __init__(self, color, value, is_wild=False): self.color = color self.value = value self.is_wild = is_wild def valid_to_play(card, top_card): if
12 Oct 2024 3 min read
Page 1 of 1
Yibo's Blog © 2025
  • Sign up
Powered by Ghost