from django import forms
from django.core.validators import *


class LoginForm(forms.Form):
    username = forms.CharField(
        label="Username", min_length=4, max_length=30, widget=forms.TextInput
    )
    password = forms.CharField(
        label="Password", min_length=4, max_length=30, widget=forms.PasswordInput
    )
    game_id = forms.CharField(label="Game ID", widget=forms.NumberInput)
    create_join_game = forms.ChoiceField(
        label="Create/Join Game",
        choices=(("1", "Join"), ("2", "Create")),
    )


class GamesettingsForm(forms.Form):
    rounds = forms.CharField(label="set number of rounds:", required=False, widget=forms.NumberInput)
    timer = forms.CharField(label="set roundtimer:", required=False, widget=forms.NumberInput)
    ordermarketsize = forms.CharField(label="set ordermarket size:", required=False, widget=forms.NumberInput)
