from server.model.color import Color
from server.model.value import Value


def encode_value(v: Value):
    return {
        "Two": "Deux",
        "Three": "Trois",
        "Four": "Quatre",
        "Five": "Cinq",
        "Six": "Six",
        "Seven": "Sept",
        "Eight": "Huit",
        "Nine": "Neuf",
        "Ten": "Dix",
        "Jack": "Valet",
        "Queen": "Dame",
        "King": "Roi",
        "Ace": "As"
    }[v.name]


def encode_color(c: Color):
    return {
        "Hearts": "Coeur",
        "Spades": "Pique",
        "Clubs": "Trèfle",
        "Diamonds": "Carreau"
    }[c.name]