From 4375ac04ed98cae2f64b9bfe32ce85de7993b13e Mon Sep 17 00:00:00 2001 From: NINI Date: Wed, 7 Oct 2026 00:08:38 +0900 Subject: [PATCH] Inspect rapid-count board through native yaw and pitch views --- tools/android/exercise-final-progression.ps1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/android/exercise-final-progression.ps1 b/tools/android/exercise-final-progression.ps1 index 0989fd7..fe6b074 100644 --- a/tools/android/exercise-final-progression.ps1 +++ b/tools/android/exercise-final-progression.ps1 @@ -10,12 +10,14 @@ function BallRadiusPixels($CurrentBoard,$Ball) { $local=[Numerics.Vector3]::Transform([Numerics.Vector3]::new($Ball.position.x,$Ball.position.y,$Ball.position.z)-$origin,[Numerics.Quaternion]::Inverse($rotation)) return 540*.55/([Math]::Tan(31*[Math]::PI/180)*$local.Z) } -function Orbit([string]$Name,$CurrentBoard) { +function Orbit([string]$Name,$CurrentBoard,[switch]$Pitch) { if(!$CurrentBoard){$saved=Save "$Name-view";$CurrentBoard=if($saved.puzzleStates.Count){$saved.puzzleStates[-1]}else{$saved.latestFreePlay}} $points=@($CurrentBoard.balls|ForEach-Object{,(BallPoint $CurrentBoard $_.id)}) foreach($y in @(300,700)){foreach($x in @(650,900,1150,1400,1650)){ if(@($points|Where-Object{[Math]::Pow($_[0]-$x,2)+[Math]::Pow($_[1]-$y,2)-lt22500}).Count-eq0){ - Step $Name @('shell','input','swipe',"$x","$y","$($x+120)","$y",'350');return + $endX=if($Pitch){$x}else{$x+120};$endY=if($Pitch){$y+120}else{$y} + if($endY-gt750){continue} + Step $Name @('shell','input','swipe',"$x","$y","$endX","$endY",'350');return } }} throw 'No safe blank orbit start in the actual board view.' @@ -163,7 +165,7 @@ try { if($stage-eq20) { # Cache projected coordinates, then only native taps during speech; duplicates must not queue another word. $visible=$false - for($view=0;$view-lt24;$view++){ + for($view=0;$view-lt48;$view++){ $actual=Board (Save "twenty-before-rapid-view-$view") 20 $points=@($actual.balls|ForEach-Object{,(BallPoint $actual $_.id)}) $visible=@($points|Where-Object{!(WorldSafe $_)}).Count-eq0 @@ -172,7 +174,8 @@ try { $centreDistanceSquared=[Math]::Pow($points[$a][0]-$points[$b][0],2)+[Math]::Pow($points[$a][1]-$points[$b][1],2) if($centreDistanceSquared-lt[Math]::Pow([Math]::Max($radii[$a],$radii[$b])+8,2)){$visible=$false} }} - if($visible){break};Orbit "twenty-rapid-safe-view-$view" $actual + if($visible){break} + Orbit "twenty-rapid-safe-view-$view" $actual -Pitch:($view%12-eq11) } Check 'twenty-all-ten-safe-separated-projections' $visible ($points|ConvertTo-Json -Compress) StartAudio 'audio-ten-rapid' 24