1. Przejście na MIDP-2.0, by umożliwić obsługę focusowania.
2. Powrót do CLDC-1.0.
3. Uwzględnienie stanu przed/po partii przeciwników, a nie tylko własnego.
4. Poprawka literówki w tabelach procentowych.
 
	
	
	
	
	
	
	
	
	
	
	
	
	
 |  |  | 
 |  |  | platform.active=Sun_Java_TM__Wireless_Toolkit_2_5_2_for_CLDC | 
 |  |  | platform.active.description=Sun Java(TM) Wireless Toolkit 2.5.2 for CLDC | 
 |  |  | platform.apis= | 
 |  |  | platform.bootclasspath=${platform.home}/lib/cldcapi11.jar:${platform.home}/lib/midpapi10.jar | 
 |  |  | platform.configuration=CLDC-1.1 | 
 |  |  | platform.bootclasspath=${platform.home}/lib/cldcapi10.jar:${platform.home}/lib/midpapi20.jar | 
 |  |  | platform.configuration=CLDC-1.0 | 
 |  |  | platform.device=DefaultColorPhone | 
 |  |  | platform.fat.jar=true | 
 |  |  | platform.profile=MIDP-1.0 | 
 |  |  | platform.profile=MIDP-2.0 | 
 |  |  | platform.trigger=CLDC | 
 |  |  | platform.type=UEI-1.0.1 | 
 |  |  | preprocessed.dir=${build.dir}/preprocessed | 
 
 |  |  | 
 |  |  |         this.kontraChoice.append("rektr.", null); | 
 |  |  |          | 
 |  |  |         this.partiaChoice = new ChoiceGroup(null, ChoiceGroup.EXCLUSIVE); | 
 |  |  |         this.partiaChoice.append("przed", null); | 
 |  |  |         this.partiaChoice.append("po", null); | 
 |  |  |         this.partiaChoice.append("przed / przed", null); | 
 |  |  |         this.partiaChoice.append("przed / po", null); | 
 |  |  |         this.partiaChoice.append("po / przed", null); | 
 |  |  |         this.partiaChoice.append("po / po", null); | 
 |  |  |          | 
 |  |  |         this.punktyField = new TextField("PC:", null, 2, TextField.NUMERIC); | 
 |  |  |         this.lewyField = new TextField("Lew:", null, 2, TextField.NUMERIC); | 
 |  |  | 
 |  |  |         } | 
 |  |  |          | 
 |  |  |         BrydzWynik wynik; | 
 |  |  |          | 
 |  |  |         String data = ""; | 
 |  |  |          | 
 |  |  |                  | 
 |  |  |         if( kontrakt < 0  || kontrakt > 7 ) { | 
 |  |  |             this.resultText.setText("Niepoprawny kontrakt."); | 
 |  |  |             return; | 
 |  |  | 
 |  |  |             return; | 
 |  |  |         } | 
 |  |  |          | 
 |  |  |         if( partia != 0 && partia != 1) { | 
 |  |  |         if( partia < 0 || partia > 3) { | 
 |  |  |             this.resultText.setText("Niepoprawna informacja o partii."); | 
 |  |  |             return; | 
 |  |  |         } | 
 
 |  |  | 
 |  |  |         } | 
 |  |  |     }; | 
 |  |  |      | 
 |  |  |     protected int PC[][] = { | 
 |  |  |         // przed partią | 
 |  |  |         {-1400, -1400, -1400, -1400, -1200, -1100, -1000, -900, -700, -600, -490, -460, -430, -400, -350, -300, -200, -110, -70, -50, 0, 50, 70, 110, 200, 300, 350, 400, 430, 460, 490, 600, 700, 900, 1000, 1100, 1200, 1400, 1400, 1400, 1400}, | 
 |  |  |         // po partii | 
 |  |  |         {-2100, -2100, -2100, -2100, -1800, -1650, -1500, -1350, -1050, -800, -690, -660, -630, -600, -520, -440, -290, -110, -70, -50, 0, 50, 70, 110, 290, 440, 520, 600, 630, 660, 690, 800, 1050, 1350, 1500, 1650, 1800, 2100, 2100, 2100, 2100} | 
 |  |  |     protected int PC[][][] = { | 
 |  |  |         {   // MY: przed, WY: przed partią | 
 |  |  |             {-1400, -1400, -1400, -1400, -1200, -1100, -1000, -900, -700, -600, -490, -460, -430, -400, -350, -300, -200, -110, -70, -50, 0, 50, 70, 110, 200, 300, 350, 400, 430, 460, 490, 600, 700, 900, 1000, 1100, 1200, 1400, 1400, 1400, 1400}, | 
 |  |  |             // MY: przed, WY: po partii | 
 |  |  |             {-2100, -2100, -2100, -2100, -1800, -1650, -1500, -1350, -1050, -800, -690, -660, -630, -600, -520, -440, -290, -110, -70, -50, 0, 50, 70, 110, 200, 300, 350, 400, 430, 460, 490, 600, 700, 900, 1000, 1100, 1200, 1400, 1400, 1400, 1400} | 
 |  |  |         }, | 
 |  |  |         {   // MY: po, WY: przed partią | 
 |  |  |             {-1400, -1400, -1400, -1400, -1200, -1100, -1000, -900, -700, -600, -490, -460, -430, -400, -350, -300, -200, -110, -70, -50, 0, 50, 70, 110, 290, 440, 520, 600, 630, 660, 690, 800, 1050, 1350, 1500, 1650, 1800, 2100, 2100, 2100, 2100}, | 
 |  |  |             // MY: po, WY: po partii | 
 |  |  |             {-2100, -2100, -2100, -2100, -1800, -1650, -1500, -1350, -1050, -800, -690, -660, -630, -600, -520, -440, -290, -110, -70, -50, 0, 50, 70, 110, 290, 440, 520, 600, 630, 660, 690, 800, 1050, 1350, 1500, 1650, 1800, 2100, 2100, 2100, 2100} | 
 |  |  |         } | 
 |  |  |     }; | 
 |  |  |      | 
 |  |  |     protected int IMP[] = {0, 20, 50, 90, 130, 170, 220, 270, 320, 370, 430, 500, 600, 750, 900, 1100, 1300, 1500, 1750, 2000, 2250, 2500, 3000, 3500, 4000, 9999999}; | 
 |  |  |      | 
 |  |  |     protected int procenty_punkty[][] = { | 
 |  |  |         {0, 50, 90, 120, 150, 180, 210, 300, 400, 430, 460, 490, 520, 800, 920, 940, 980, 990, 1020, 1400, 1440, 1520, 1530, 9999999}, // przed | 
 |  |  |         {0, 50, 90, 120, 150, 180, 210, 500, 600, 360, 660, 690, 720, 810, 1370, 1390, 1430, 1440, 1470, 1700, 2000, 2200, 2230, 9999999} //po | 
 |  |  |         {0, 50, 90, 120, 150, 180, 210, 500, 600, 360, 660, 690, 720, 810, 1370, 1390, 1430, 1440, 1470, 1700, 2000, 2220, 2230, 9999999} //po | 
 |  |  |     }; | 
 |  |  |      | 
 |  |  |     protected int procenty_PC[] = {0, 6, 10, 16, 21, 25, 31, 35, 9999999}; | 
 |  |  | 
 |  |  |      | 
 |  |  |     public BrydzWynik policz(int kontrakt, int kolor, int kontra, int partia, int PC, int lewy) { | 
 |  |  |         BrydzWynik wynik = new BrydzWynik(); | 
 |  |  |         int my_partia = partia / 2; | 
 |  |  |         int wy_partia = partia % 2; | 
 |  |  |          | 
 |  |  |         // 4 pasy | 
 |  |  |         if( kontrakt == 0 ) { | 
 |  |  |             wynik.dla = 1; | 
 |  |  |             wynik.punkty = this.PC[partia][PC]; | 
 |  |  |             wynik.punkty = this.PC[my_partia][wy_partia][PC]; | 
 |  |  |             wynik.IMP = this.IMP(wynik.punkty); | 
 |  |  |             wynik.procent = 100-this.procenty(PC, 0, partia); | 
 |  |  |             wynik.procent = 100-this.procenty(PC, 0, my_partia); | 
 |  |  |              | 
 |  |  |             return wynik; | 
 |  |  |         } | 
 |  |  | 
 |  |  |              | 
 |  |  |             if(kontrakt == 6) { | 
 |  |  |                 // Za szlemika | 
 |  |  |                 wynik_punkty += (partia == 0 ? 500 : 750); | 
 |  |  |                 wynik_punkty += (my_partia == 0 ? 500 : 750); | 
 |  |  |             } | 
 |  |  |             else if(kontrakt == 7) { | 
 |  |  |                 // Za szlema | 
 |  |  |                 wynik_punkty += (partia == 0 ? 1000 : 1500); | 
 |  |  |                 wynik_punkty += (my_partia == 0 ? 1000 : 1500); | 
 |  |  |             } | 
 |  |  |              | 
 |  |  |             if(wynik_lewy >= 100) { | 
 |  |  |                 // Za partię | 
 |  |  |                 wynik_punkty += (partia == 0 ? 300 : 500); | 
 |  |  |                 wynik_punkty += (my_partia == 0 ? 300 : 500); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  | 
 |  |  |         else | 
 |  |  |         { | 
 |  |  |             // Punkty za wpadkę | 
 |  |  |             wynik_punkty = -1 * this.wpadki[partia][kontra][-1 * nadrobki]; | 
 |  |  |             wynik_punkty = -1 * this.wpadki[my_partia][kontra][-1 * nadrobki]; | 
 |  |  |         } | 
 |  |  |          | 
 |  |  |         // Uwzględniamy ilość punktów, którą trzeba było zdobyć | 
 |  |  |         wynik_punkty_PC = wynik_punkty - this.PC[partia][PC]; | 
 |  |  |         wynik_punkty_PC = wynik_punkty - this.PC[my_partia][wy_partia][PC]; | 
 |  |  |          | 
 |  |  |         // Zapis dla przeciwników | 
 |  |  |         if( wynik_punkty_PC < 0 ) { | 
 |  |  | 
 |  |  |             wynik.punkty = -1 * wynik_punkty_PC; | 
 |  |  |             wynik.IMP = IMP(wynik.punkty); | 
 |  |  |             if( wynik_punkty < 0 ) { | 
 |  |  |                 wynik.procent = procenty(40 - PC, -1 * wynik_punkty, partia); | 
 |  |  |                 wynik.procent = procenty(40 - PC, -1 * wynik_punkty, wy_partia); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 wynik.procent = 100 - procenty(PC, wynik_punkty, partia); | 
 |  |  |                 wynik.procent = 100 - procenty(PC, wynik_punkty, my_partia); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         // Zapis dla rozgrywających | 
 |  |  | 
 |  |  |             wynik.punkty = wynik_punkty_PC; | 
 |  |  |             wynik.IMP = IMP(wynik.punkty); | 
 |  |  |             if( wynik_punkty > 0 ) { | 
 |  |  |                 wynik.procent = procenty(PC, wynik_punkty, partia); | 
 |  |  |                 wynik.procent = procenty(PC, wynik_punkty, my_partia); | 
 |  |  |             } | 
 |  |  |             else | 
 |  |  |             { | 
 |  |  |                 wynik.procent = 100 - procenty(40 - PC, -1 * wynik_punkty, partia); | 
 |  |  |                 wynik.procent = 100 - procenty(40 - PC, -1 * wynik_punkty, wy_partia); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |          |