Пример #1
0
def data_hand_label( request, params = {} ):
  hand_chars = request.GET['hand']
  pghand = PGHand.create( PGTile.objects.get( tile_char = hand_chars[0] ), PGTile.objects.get( tile_char = hand_chars[1] ) )
  label = pghand.label()
  pghand = PGHand.create( PGTile.objects.get( tile_char = hand_chars[2] ), PGTile.objects.get( tile_char = hand_chars[3] ) )
  label = label + "|" + pghand.label()
  return HttpResponse( label )
Пример #2
0
def data_hand_label(request, params={}):
    hand_chars = request.GET['hand']
    pghand = PGHand.create(PGTile.objects.get(tile_char=hand_chars[0]),
                           PGTile.objects.get(tile_char=hand_chars[1]))
    label = pghand.label()
    pghand = PGHand.create(PGTile.objects.get(tile_char=hand_chars[2]),
                           PGTile.objects.get(tile_char=hand_chars[3]))
    label = label + "|" + pghand.label()
    return HttpResponse(label)
Пример #3
0
 def ordering_with_tiles(self, i0, i1, i2, i3, tst):
     from paigow.pghand import PGHand
     return tst( PGHand.create( self.tiles[i0], self.tiles[i1] ) ) or \
            tst( PGHand.create( self.tiles[i2], self.tiles[i3] ) )
Пример #4
0
def show_hand_label( context, tile1, tile2 ):
  if ( context['player_type'] == "opponent" ):
    return "--"
  pghand = PGHand.create( tile1, tile2 )
  return pghand.label()
Пример #5
0
 def ordering_with_tiles( self, i0, i1, i2, i3, tst ):
   from paigow.pghand import PGHand
   return tst( PGHand.create( self.tiles[i0], self.tiles[i1] ) ) or \
          tst( PGHand.create( self.tiles[i2], self.tiles[i3] ) )