コード例 #1
0
ファイル: patient.py プロジェクト: bdintu/clinic-api
 def __init__(self):
     self.sel = text('select * from PATIENT')
     self.sel_con = text(
         'select * from PATIENT where PEOPLE_ID = :people_id')
     self.ins = text(
         'insert into PATIENT (PEOPLE_ID, GENDER, BLOOD_ID , CLASH, BIRTHDATE) values (:people_id, :gender, :blood_id, :clash, :birthdate)'
     )
コード例 #2
0
ファイル: dispense.py プロジェクト: bdintu/clinic-api
 def __init__(self):
     self.sel = text('select * from DISPENSE')
     self.sel_con = text(
         'select * from DISPENSE where TREATMENT_ID = :treatment_id')
     self.ins = text(
         'insert into DISPENSE (TREATMENT_ID, MEDICINE_ID, AMOUNT , PRICE) SELECT :treatment_id, :medicine_id, :amount, PRICE*:amount from MEDICINE WHERE ID = :medicine_id'
     )
コード例 #3
0
ファイル: treatment.py プロジェクト: bdintu/clinic-api
 def __init__(self):
     self.sel = text('select * from TREATMENT')
     self.sel_treatment = text(
         'select * from TREATMENT where ID = :treatment_id order by ID desc'
     )
     self.sel_people = text(
         'select * from TREATMENT where PEOPLE_ID = :people_id order by ID desc'
     )
     self.ins = text(
         'insert into TREATMENT (DOCTOR_ID, PEOPLE_ID, BEHAVIOUR, PRESSURE_HIGHT, PRESSURE_LOW, TREATMENT_DATE, HEIGHT, WEIGHT) values (:doctor_id, :people_id, :behaviour, :pressure_hight, :pressure_low, :treatment_date, :hight, :weight)'
     )
コード例 #4
0
 def __init__(self, score, position):
     x, y = position
     surface, rect = text(str(score), SpaceInvadersColor.WHITE.value, *SpaceInvadersFont.SMALL.value,
                          position=(x + 20, y + 6))
     BasicSprite.__init__(self, surface, rect)
     self.start_time = 600
     self.row = MYSTERY_ROW
コード例 #5
0
ファイル: life.py プロジェクト: geronimo-iia/space_invaders
 def __init__(self, game):
     BaseScene.__init__(self, game, active=True)
     self.life_text = BasicSprite(
         *text('Lives', SpaceInvadersColor.WHITE.value, *SpaceInvadersFont.SMALL.value, position=(640, 5)))
     self.life_1 = BasicSprite(*graphic('ship', position=(715, 3), scale=(23, 23)))
     self.life_2 = BasicSprite(*graphic('ship', position=(742, 3), scale=(23, 23)))
     self.life_3 = BasicSprite(*graphic('ship', position=(769, 3), scale=(23, 23)))
コード例 #6
0
 def __init__(self, game):
     BaseScene.__init__(self, game)
     self.group.add(
         BasicSprite(*text('Game Over',
                           SpaceInvadersColor.WHITE.value,
                           *SpaceInvadersFont.LARGE.value,
                           position=(250, 270))))
     self.menu_time = 0.0
コード例 #7
0
ファイル: score.py プロジェクト: geronimo-iia/space_invaders
 def set_score(self, score):
     self.group.empty()
     self.group.add(self.score_label)
     self.group.add(
         BasicSprite(*text(str(score),
                           SpaceInvadersColor.GREEN.value,
                           *SpaceInvadersFont.SMALL.value,
                           position=(85, 5))))
コード例 #8
0
 def __init__(self, game):
     BaseScene.__init__(self, game, active=True)
     items = [
         text('Space Invaders',
              SpaceInvadersColor.WHITE.value,
              *SpaceInvadersFont.LARGE.value,
              position=(164, 155)),
         text('Press any key to continue',
              SpaceInvadersColor.WHITE.value,
              *SpaceInvadersFont.MEDIUM.value,
              position=(201, 225)),
         graphic('enemy3_1', (318, 370), (40, 40)),
         text('   =   10 pts',
              SpaceInvadersColor.GREEN.value,
              *SpaceInvadersFont.MEDIUM.value,
              position=(368, 270)),
         graphic('enemy2_2', (318, 320), (40, 40)),
         text('   =   20 pts',
              SpaceInvadersColor.BLUE.value,
              *SpaceInvadersFont.MEDIUM.value,
              position=(368, 320)),
         graphic('enemy1_2', (318, 270), (40, 40)),
         text('   =   30 pts',
              SpaceInvadersColor.PURPLE.value,
              *SpaceInvadersFont.MEDIUM.value,
              position=(368, 370)),
         graphic('mystery', (299, 420), (80, 40)),
         text('   =  ?????',
              SpaceInvadersColor.RED.value,
              *SpaceInvadersFont.MEDIUM.value,
              position=(368, 420))
     ]
     for item in items:
         self.group.add(BasicSprite(*item))
コード例 #9
0
ファイル: score.py プロジェクト: geronimo-iia/space_invaders
 def __init__(self, game):
     BaseScene.__init__(self, game, active=True)
     self.score_label = BasicSprite(*text('Score',
                                          SpaceInvadersColor.WHITE.value,
                                          *SpaceInvadersFont.SMALL.value,
                                          position=(5, 5)))
コード例 #10
0
 def __init__(self):
     self.sel = text(
         'SELECT sum(IS_PAY) as own FROM RECEIPT INNER JOIN TREATMENT ON RECEIPT.TREATMENT_ID = TREATMENT.ID WHERE TREATMENT.PEOPLE_ID = :people_id'
     )
コード例 #11
0
ファイル: doctor.py プロジェクト: bdintu/clinic-api
 def __init__(self):
     self.sel = text('select * from DOCTOR')
     self.sel_con = text('select * from DOCTOR where ID = :doctor_id')
     self.ins = text(
         'insert into DOCTOR (PREFIX_NAME, FIRST_NAME, LAST_NAME, DOCTOR_SPECIFIC_ID) values (:prefix_name, :fist_name, :last_name, :doctor_specific_id)'
     )