""" URLS to display the Riichi Mahjong Rankings and the Ladder system."""

from django.conf.urls import url
from django.views.generic import RedirectView

from . import views

urlpatterns = [  # Ignore PyLintBear (C0103)
    url(r'^$',
        RedirectView.as_view(url='/ranking/mahjong-ladder/', permanent=True)),
    url(r'^event/(?P<event>[\d]+)/mahjong/$',
        views.EventHanchanList.as_view(), name="event-hanchan-list"),
    url(r'^event/(?P<event>[\d]+)/add-hanchan/$',
        views.HanchanForm.as_view(), name="add-hanchan-form"),
    url(r'^event/(?P<event>[\d]+)/mahjong-ranking/$',
        views.EventRankingList.as_view(), name="event-ranking"),
    url(r'^hanchan/(?P<hanchan>[\d]+)/edit/$',
        views.HanchanForm.as_view(), name="edit-hanchan"),
    url(r'^hanchan/(?P<hanchan>[\d]+)/delete/$',
        views.DeleteHanchan.as_view(), name="delete-hanchan"),
    url(r'^mahjong-ladder/$', views.SeasonRankingList.as_view(),
        name="mahjong-ladder"),
    url(r'^mahjong-ladder/(?P<season>[\d]+)/$',
        views.SeasonRankingList.as_view(), name="mahjong-ladder"),
    url(r'^player/(?P<username>[\-\.\d\w]+)/dan/$',
        views.PlayerDanScore.as_view(), name="player-dan-score"),
    url(r'^player/(?P<username>[\-\.\d\w]+)/invalid/$',
        views.PlayerInvalidScore.as_view(), name="player-invalid-score"),
    url(r'^player/(?P<username>[\-\.\d\w]+)/kyu/$',
        views.PlayerKyuScore.as_view(), name="player-kyu-score"),
    url(r'^player/(?P<username>[\-\.\d\w]+)/ladder/$',
        views.PlayerLadderScore.as_view(), name="player-ladder-score"),
    url(r'^mahjong/$', views.KyuDanRankingList.as_view(),
        name="kyudanranking-list"),
    url(r'^mahjong/(?P<order_by>[\+\-\w]+)/$',
        views.KyuDanRankingList.as_view(), name="kyudanranking-list"),
]
