Amazon Q CLIでポーカーを作る
この記事は、Amazon Q CLIでゲームを作ろうキャンペーンに向けて書きました。
きっかけ
Unicodeの仕様を眺めていて、面白いことに気づきました。Unicodeには、トランプカードや麻雀牌などのゲーム用の文字が定義されています。
- Playing Cards: 🂡🂢🂣🂤🂥🂦🂧🂨🂩🂪🂫🂬🂭🂮(スペード)
- Mahjong Tiles: 🀀🀁🀂🀃🀄🀅🀆(字牌)
これらの絵文字を使って、ゲームを作ってみようという発想から、今回は手札をUnicodeで描画するポーカーゲームに挑戦してみました。
※没案でMahjong Tilesを使って上海を作るというのも考えていました。
インストール
Amazon Q CLIのインストールは簡単です。
wget https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb
sudo apt install ./amazon-q.deb
実行ログ
> $ wget https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb
> --2025-06-19 02:30:18-- https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb
> Resolving [desktop-release.q.us-east-1.amazonaws.com](http://desktop-release.q.us-east-1.amazonaws.com/) ([desktop-release.q.us-east-1.amazonaws.com](http://desktop-release.q.us-east-1.amazonaws.com/))... 18.65.159.63, 18.65.159.23, 18.65.159.29, ...
> Connecting to [desktop-release.q.us-east-1.amazonaws.com](http://desktop-release.q.us-east-1.amazonaws.com/) ([desktop-release.q.us-east-1.amazonaws.com](http://desktop-release.q.us-east-1.amazonaws.com/))|18.65.159.63|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 225215250 (215M) [binary/octet-stream]
> Saving to: ‘amazon-q.deb’
>
> amazon-q.deb 100%[========================================>] 214.78M 5.73MB/s in 34s
>
> 2025-06-19 02:30:50 (6.35 MB/s) - ‘amazon-q.deb’ saved [225215250/225215250]
>
> $ sudo apt install -f ./amazon-q.deb
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> Note, selecting 'amazon-q' instead of './amazon-q.deb'
> The following additional packages will be installed:
> alsa-topology-conf alsa-ucm-conf aspell aspell-en bubblewrap dictionaries-common emacsen-common
> enchant-2 glib-networking glib-networking-common glib-networking-services gstreamer1.0-gl
> gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x hunspell-en-us libaa1 libasound2-data
> libasound2t64 libaspell15 libasyncns0 libavc1394-0 libayatana-appindicator3-1 libayatana-ido3-0.4-0
> libayatana-indicator3-7 libcaca0 libcdparanoia0 libdbusmenu-glib4 libdbusmenu-gtk3-4 libdv4t64
> libenchant-2-2 libevdev2 libflac12t64 libgles2 libgraphene-1.0-0 libgstreamer-gl1.0-0
> libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgudev-1.0-0 libharfbuzz-icu0
> libhunspell-1.7-0 libhyphen0 libiec61883-0 libjavascriptcoregtk-4.1-0 libjson-glib-1.0-0
> libjson-glib-1.0-common libmanette-0.2-0 libmp3lame0 libmpg123-0t64 libncurses6 libogg0 libopus0
> liborc-0.4-0t64 libpipewire-0.3-0t64 libpipewire-0.3-common libproxy1v5 libpulse0 libraw1394-11
> libsecret-1-0 libsecret-common libshout3 libsndfile1 libsoup-3.0-0 libsoup-3.0-common libspa-0.2-modules
> libspeex1 libtag1v5 libtag1v5-vanilla libtheora0 libtwolame0 libv4l-0t64 libv4lconvert0t64
> libvisual-0.4-0 libvorbis0a libvorbisenc2 libvpx9 libwavpack1 libwebkit2gtk-4.1-0 libwebpdemux2
> libwebpmux3 libwebrtc-audio-processing1 libwoff1 libxslt1.1 libxv1 xdg-dbus-proxy xdg-desktop-portal
> xdg-desktop-portal-gtk
> Suggested packages:
> aspell-doc spellutils wordlist gvfs hunspell openoffice.org-hunspell | openoffice.org-core alsa-utils
> libasound2-plugins libdv-bin oss-compat libenchant-2-voikko libvisual-0.4-plugins opus-tools pipewire
> pulseaudio libraw1394-doc speex gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-alsa
> accountsservice evince xdg-desktop-portal-gnome
> The following NEW packages will be installed:
> alsa-topology-conf alsa-ucm-conf amazon-q aspell aspell-en bubblewrap dictionaries-common emacsen-common
> enchant-2 glib-networking glib-networking-common glib-networking-services gstreamer1.0-gl
> gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x hunspell-en-us libaa1 libasound2-data
> libasound2t64 libaspell15 libasyncns0 libavc1394-0 libayatana-appindicator3-1 libayatana-ido3-0.4-0
> libayatana-indicator3-7 libcaca0 libcdparanoia0 libdbusmenu-glib4 libdbusmenu-gtk3-4 libdv4t64
> libenchant-2-2 libevdev2 libflac12t64 libgles2 libgraphene-1.0-0 libgstreamer-gl1.0-0
> libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgudev-1.0-0 libharfbuzz-icu0
> libhunspell-1.7-0 libhyphen0 libiec61883-0 libjavascriptcoregtk-4.1-0 libjson-glib-1.0-0
> libjson-glib-1.0-common libmanette-0.2-0 libmp3lame0 libmpg123-0t64 libncurses6 libogg0 libopus0
> liborc-0.4-0t64 libpipewire-0.3-0t64 libpipewire-0.3-common libproxy1v5 libpulse0 libraw1394-11
> libsecret-1-0 libsecret-common libshout3 libsndfile1 libsoup-3.0-0 libsoup-3.0-common libspa-0.2-modules
> libspeex1 libtag1v5 libtag1v5-vanilla libtheora0 libtwolame0 libv4l-0t64 libv4lconvert0t64
> libvisual-0.4-0 libvorbis0a libvorbisenc2 libvpx9 libwavpack1 libwebkit2gtk-4.1-0 libwebpdemux2
> libwebpmux3 libwebrtc-audio-processing1 libwoff1 libxslt1.1 libxv1 xdg-dbus-proxy xdg-desktop-portal
> xdg-desktop-portal-gtk
> 0 upgraded, 88 newly installed, 0 to remove and 17 not upgraded.
> Need to get 49.3 MB/274 MB of archives.
> After this operation, 167 MB of additional disk space will be used.
> Do you want to continue? [Y/n] Y
> Get:1 http://archive.ubuntu.com/ubuntu noble/main amd64 libevdev2 amd64 1.13.1+dfsg-1build1 [37.8 kB]
> Get:2 /home/inoue/amazon-q.deb amazon-q amd64 1.12.1 [225 MB]
> Get:3 http://archive.ubuntu.com/ubuntu noble/main amd64 libncurses6 amd64 6.4+20240113-1ubuntu2 [112 kB]
> Get:4 http://archive.ubuntu.com/ubuntu noble/main amd64 alsa-topology-conf all 1.2.5.1-2 [15.5 kB]
> Get:5 http://archive.ubuntu.com/ubuntu noble/main amd64 libasound2-data all 1.2.11-1build2 [21.0 kB]
> Get:6 http://archive.ubuntu.com/ubuntu noble/main amd64 libasound2t64 amd64 1.2.11-1build2 [399 kB]
> Get:7 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 alsa-ucm-conf all 1.2.10-1ubuntu5.4 [64.8 kB]
> Get:8 http://archive.ubuntu.com/ubuntu noble/main amd64 libaspell15 amd64 0.60.8.1-1build1 [323 kB]
> Get:9 http://archive.ubuntu.com/ubuntu noble/main amd64 emacsen-common all 3.0.5 [12.1 kB]
> Get:10 http://archive.ubuntu.com/ubuntu noble/main amd64 dictionaries-common all 1.29.7 [188 kB]
> Get:11 http://archive.ubuntu.com/ubuntu noble/main amd64 aspell amd64 0.60.8.1-1build1 [88.1 kB]
> Get:12 http://archive.ubuntu.com/ubuntu noble/main amd64 aspell-en all 2020.12.07-0-1 [303 kB]
> Get:13 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 bubblewrap amd64 0.9.0-1ubuntu0.1 [50.2 kB]
> Get:14 http://archive.ubuntu.com/ubuntu noble/main amd64 hunspell-en-us all 1:2020.12.07-2 [280 kB]
> Get:15 http://archive.ubuntu.com/ubuntu noble/main amd64 libhunspell-1.7-0 amd64 1.7.2+really1.7.2-10build3 [294 kB]
> Get:16 http://archive.ubuntu.com/ubuntu noble/main amd64 libenchant-2-2 amd64 2.3.3-2build2 [51.4 kB]
> Get:17 http://archive.ubuntu.com/ubuntu noble/main amd64 enchant-2 amd64 2.3.3-2build2 [13.0 kB]
> Get:18 http://archive.ubuntu.com/ubuntu noble/main amd64 libproxy1v5 amd64 0.5.4-4build1 [26.5 kB]
> Get:19 http://archive.ubuntu.com/ubuntu noble/main amd64 glib-networking-common all 2.80.0-1build1 [6702 B]
> Get:20 http://archive.ubuntu.com/ubuntu noble/main amd64 glib-networking-services amd64 2.80.0-1build1 [12.8 kB]
> Get:21 http://archive.ubuntu.com/ubuntu noble/main amd64 glib-networking amd64 2.80.0-1build1 [64.1 kB]
> Get:22 http://archive.ubuntu.com/ubuntu noble/main amd64 libgraphene-1.0-0 amd64 1.10.8-3build2 [46.2 kB]
> Get:23 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 liborc-0.4-0t64 amd64 1:0.4.38-1ubuntu0.1 [207 kB]
> Get:24 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libgstreamer-plugins-base1.0-0 amd64 1.24.2-1ubuntu0.2 [862 kB]
> Get:25 http://archive.ubuntu.com/ubuntu noble/main amd64 libgudev-1.0-0 amd64 1:238-5ubuntu1 [15.9 kB]
> Get:26 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libgstreamer-gl1.0-0 amd64 1.24.2-1ubuntu0.2 [214 kB]
> Get:27 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gstreamer1.0-gl amd64 1.24.2-1ubuntu0.2 [116 kB]
> Get:28 http://archive.ubuntu.com/ubuntu noble/main amd64 libcdparanoia0 amd64 3.10.2+debian-14build3 [48.5 kB]
> Get:29 http://archive.ubuntu.com/ubuntu noble/main amd64 libogg0 amd64 1.3.5-3build1 [22.7 kB]
> Get:30 http://archive.ubuntu.com/ubuntu noble/main amd64 libopus0 amd64 1.4-1build1 [208 kB]
> Get:31 http://archive.ubuntu.com/ubuntu noble/main amd64 libtheora0 amd64 1.1.1+dfsg.1-16.1build3 [211 kB]
> Get:32 http://archive.ubuntu.com/ubuntu noble/main amd64 libvisual-0.4-0 amd64 0.4.2-2build1 [115 kB]
> Get:33 http://archive.ubuntu.com/ubuntu noble/main amd64 libvorbis0a amd64 1.3.7-1build3 [97.6 kB]
> Get:34 http://archive.ubuntu.com/ubuntu noble/main amd64 libvorbisenc2 amd64 1.3.7-1build3 [80.8 kB]
> Get:35 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gstreamer1.0-plugins-base amd64 1.24.2-1ubuntu0.2 [721 kB]
> Get:36 http://archive.ubuntu.com/ubuntu noble/main amd64 libaa1 amd64 1.4p5-51.1 [49.9 kB]
> Get:37 http://archive.ubuntu.com/ubuntu noble/main amd64 libraw1394-11 amd64 2.1.2-2build3 [26.2 kB]
> Get:38 http://archive.ubuntu.com/ubuntu noble/main amd64 libavc1394-0 amd64 0.5.4-5build3 [15.4 kB]
> Get:39 http://archive.ubuntu.com/ubuntu noble/main amd64 libcaca0 amd64 0.99.beta20-4build2 [208 kB]
> Get:40 http://archive.ubuntu.com/ubuntu noble/main amd64 libdv4t64 amd64 1.0.0-17.1build1 [63.2 kB]
> Get:41 http://archive.ubuntu.com/ubuntu noble/main amd64 libflac12t64 amd64 1.4.3+ds-2.1ubuntu2 [197 kB]
> Get:42 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libgstreamer-plugins-good1.0-0 amd64 1.24.2-1ubuntu1.1 [32.9 kB]
> Get:43 http://archive.ubuntu.com/ubuntu noble/main amd64 libiec61883-0 amd64 1.2.0-6build1 [24.5 kB]
> Get:44 http://archive.ubuntu.com/ubuntu noble/main amd64 libmp3lame0 amd64 3.100-6build1 [142 kB]
> Get:45 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libmpg123-0t64 amd64 1.32.5-1ubuntu1.1 [169 kB]
> Get:46 http://archive.ubuntu.com/ubuntu noble/main amd64 libasyncns0 amd64 0.8-6build4 [11.3 kB]
> Get:47 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libsndfile1 amd64 1.2.2-1ubuntu5.24.04.1 [209 kB]
> Get:48 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libpulse0 amd64 1:16.1+dfsg1-2ubuntu10.1 [292 kB]
> Get:49 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libspeex1 amd64 1.2.1-2ubuntu2.24.04.1 [59.6 kB]
> Get:50 http://archive.ubuntu.com/ubuntu noble/main amd64 libshout3 amd64 2.4.6-1build2 [50.3 kB]
> Get:51 http://archive.ubuntu.com/ubuntu noble/main amd64 libtag1v5-vanilla amd64 1.13.1-1build1 [326 kB]
> Get:52 http://archive.ubuntu.com/ubuntu noble/main amd64 libtag1v5 amd64 1.13.1-1build1 [11.7 kB]
> Get:53 http://archive.ubuntu.com/ubuntu noble/main amd64 libtwolame0 amd64 0.4.0-2build3 [52.3 kB]
> Get:54 http://archive.ubuntu.com/ubuntu noble/main amd64 libv4lconvert0t64 amd64 1.26.1-4build3 [87.6 kB]
> Get:55 http://archive.ubuntu.com/ubuntu noble/main amd64 libv4l-0t64 amd64 1.26.1-4build3 [46.9 kB]
> Get:56 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libvpx9 amd64 1.14.0-1ubuntu2.2 [1143 kB]
> Get:57 http://archive.ubuntu.com/ubuntu noble/main amd64 libwavpack1 amd64 5.6.0-1build1 [84.6 kB]
> Get:58 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libsoup-3.0-common all 3.4.4-5ubuntu0.4 [11.1 kB]
> Get:59 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libsoup-3.0-0 amd64 3.4.4-5ubuntu0.4 [290 kB]
> Get:60 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gstreamer1.0-plugins-good amd64 1.24.2-1ubuntu1.1 [2238 kB]
> Get:61 http://archive.ubuntu.com/ubuntu noble/main amd64 libxv1 amd64 2:1.0.11-1.1build1 [10.7 kB]
> Get:62 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gstreamer1.0-x amd64 1.24.2-1ubuntu0.2 [85.0 kB]
> Get:63 http://archive.ubuntu.com/ubuntu noble/main amd64 libayatana-ido3-0.4-0 amd64 0.10.1-1build2 [56.6 kB]
> Get:64 http://archive.ubuntu.com/ubuntu noble/main amd64 libayatana-indicator3-7 amd64 0.9.4-1build1 [31.7 kB]
> Get:65 http://archive.ubuntu.com/ubuntu noble/main amd64 libdbusmenu-glib4 amd64 18.10.20180917~bzr492+repack1-3.1ubuntu5 [43.0 kB]
> Get:66 http://archive.ubuntu.com/ubuntu noble/main amd64 libdbusmenu-gtk3-4 amd64 18.10.20180917~bzr492+repack1-3.1ubuntu5 [27.6 kB]
> Get:67 http://archive.ubuntu.com/ubuntu noble/main amd64 libayatana-appindicator3-1 amd64 0.5.93-1build3 [24.7 kB]
> Get:68 http://archive.ubuntu.com/ubuntu noble/main amd64 libharfbuzz-icu0 amd64 8.3.0-2build2 [13.3 kB]
> Get:69 http://archive.ubuntu.com/ubuntu noble/main amd64 libhyphen0 amd64 2.8.8-7build3 [26.5 kB]
> Get:70 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libjavascriptcoregtk-4.1-0 amd64 2.48.3-0ubuntu0.24.04.1 [8951 kB]
> Get:71 http://archive.ubuntu.com/ubuntu noble/main amd64 libjson-glib-1.0-common all 1.8.0-2build2 [4244 B]
> Get:72 http://archive.ubuntu.com/ubuntu noble/main amd64 libjson-glib-1.0-0 amd64 1.8.0-2build2 [68.0 kB]
> Get:73 http://archive.ubuntu.com/ubuntu noble/main amd64 libmanette-0.2-0 amd64 0.2.7-1build2 [30.6 kB]
> Get:74 http://archive.ubuntu.com/ubuntu noble/main amd64 libwebrtc-audio-processing1 amd64 0.3.1-0ubuntu6 [290 kB]
> Get:75 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libspa-0.2-modules amd64 1.0.5-1ubuntu3 [626 kB]
> Get:76 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libpipewire-0.3-0t64 amd64 1.0.5-1ubuntu3 [252 kB]
> Get:77 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libpipewire-0.3-common all 1.0.5-1ubuntu3 [18.8 kB]
> Get:78 http://archive.ubuntu.com/ubuntu noble/main amd64 libsecret-common all 0.21.4-1build3 [4962 B]
> Get:79 http://archive.ubuntu.com/ubuntu noble/main amd64 libsecret-1-0 amd64 0.21.4-1build3 [116 kB]
> Get:80 http://archive.ubuntu.com/ubuntu noble/main amd64 libgles2 amd64 1.7.0-1build1 [17.1 kB]
> Get:81 http://archive.ubuntu.com/ubuntu noble/main amd64 xdg-dbus-proxy amd64 0.1.5-1build2 [25.9 kB]
> Get:82 http://archive.ubuntu.com/ubuntu noble/main amd64 libwebpdemux2 amd64 1.3.2-0.4build3 [12.4 kB]
> Get:83 http://archive.ubuntu.com/ubuntu noble/main amd64 libwebpmux3 amd64 1.3.2-0.4build3 [25.7 kB]
> Get:84 http://archive.ubuntu.com/ubuntu noble/main amd64 libwoff1 amd64 1.0.2-2build1 [45.3 kB]
> Get:85 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libxslt1.1 amd64 1.1.39-0exp1ubuntu0.24.04.2 [167 kB]
> Get:86 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libwebkit2gtk-4.1-0 amd64 2.48.3-0ubuntu0.24.04.1 [26.8 MB]
> Get:87 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 xdg-desktop-portal amd64 1.18.4-1ubuntu2.24.04.1 [298 kB]
> Get:88 http://archive.ubuntu.com/ubuntu noble/main amd64 xdg-desktop-portal-gtk amd64 1.15.1-1build2 [80.3 kB]
> Fetched 49.3 MB in 16s (3061 kB/s)
> Extracting templates from packages: 100%
> Preconfiguring packages ...
> Selecting previously unselected package libevdev2:amd64.
> (Reading database ... 53751 files and directories currently installed.)
> Preparing to unpack .../00-libevdev2_1.13.1+dfsg-1build1_amd64.deb ...
> Unpacking libevdev2:amd64 (1.13.1+dfsg-1build1) ...
> Selecting previously unselected package libncurses6:amd64.
> Preparing to unpack .../01-libncurses6_6.4+20240113-1ubuntu2_amd64.deb ...
> Unpacking libncurses6:amd64 (6.4+20240113-1ubuntu2) ...
> Selecting previously unselected package alsa-topology-conf.
> Preparing to unpack .../02-alsa-topology-conf_1.2.5.1-2_all.deb ...
> Unpacking alsa-topology-conf (1.2.5.1-2) ...
> Selecting previously unselected package libasound2-data.
> Preparing to unpack .../03-libasound2-data_1.2.11-1build2_all.deb ...
> Unpacking libasound2-data (1.2.11-1build2) ...
> Selecting previously unselected package libasound2t64:amd64.
> Preparing to unpack .../04-libasound2t64_1.2.11-1build2_amd64.deb ...
> Unpacking libasound2t64:amd64 (1.2.11-1build2) ...
> Selecting previously unselected package alsa-ucm-conf.
> Preparing to unpack .../05-alsa-ucm-conf_1.2.10-1ubuntu5.4_all.deb ...
> Unpacking alsa-ucm-conf (1.2.10-1ubuntu5.4) ...
> Selecting previously unselected package libaspell15:amd64.
> Preparing to unpack .../06-libaspell15_0.60.8.1-1build1_amd64.deb ...
> Unpacking libaspell15:amd64 (0.60.8.1-1build1) ...
> Selecting previously unselected package emacsen-common.
> Preparing to unpack .../07-emacsen-common_3.0.5_all.deb ...
> Unpacking emacsen-common (3.0.5) ...
> Selecting previously unselected package dictionaries-common.
> Preparing to unpack .../08-dictionaries-common_1.29.7_all.deb ...
> Adding 'diversion of /usr/share/dict/words to /usr/share/dict/words.pre-dictionaries-common by dictionaries-common'
> Unpacking dictionaries-common (1.29.7) ...
> Selecting previously unselected package aspell.
> Preparing to unpack .../09-aspell_0.60.8.1-1build1_amd64.deb ...
> Unpacking aspell (0.60.8.1-1build1) ...
> Selecting previously unselected package aspell-en.
> Preparing to unpack .../10-aspell-en_2020.12.07-0-1_all.deb ...
> Unpacking aspell-en (2020.12.07-0-1) ...
> Selecting previously unselected package bubblewrap.
> Preparing to unpack .../11-bubblewrap_0.9.0-1ubuntu0.1_amd64.deb ...
> Unpacking bubblewrap (0.9.0-1ubuntu0.1) ...
> Selecting previously unselected package hunspell-en-us.
> Preparing to unpack .../12-hunspell-en-us_1%3a2020.12.07-2_all.deb ...
> Unpacking hunspell-en-us (1:2020.12.07-2) ...
> Selecting previously unselected package libhunspell-1.7-0:amd64.
> Preparing to unpack .../13-libhunspell-1.7-0_1.7.2+really1.7.2-10build3_amd64.deb ...
> Unpacking libhunspell-1.7-0:amd64 (1.7.2+really1.7.2-10build3) ...
> Selecting previously unselected package libenchant-2-2:amd64.
> Preparing to unpack .../14-libenchant-2-2_2.3.3-2build2_amd64.deb ...
> Unpacking libenchant-2-2:amd64 (2.3.3-2build2) ...
> Selecting previously unselected package enchant-2.
> Preparing to unpack .../15-enchant-2_2.3.3-2build2_amd64.deb ...
> Unpacking enchant-2 (2.3.3-2build2) ...
> Selecting previously unselected package libproxy1v5:amd64.
> Preparing to unpack .../16-libproxy1v5_0.5.4-4build1_amd64.deb ...
> Unpacking libproxy1v5:amd64 (0.5.4-4build1) ...
> Selecting previously unselected package glib-networking-common.
> Preparing to unpack .../17-glib-networking-common_2.80.0-1build1_all.deb ...
> Unpacking glib-networking-common (2.80.0-1build1) ...
> Selecting previously unselected package glib-networking-services.
> Preparing to unpack .../18-glib-networking-services_2.80.0-1build1_amd64.deb ...
> Unpacking glib-networking-services (2.80.0-1build1) ...
> Selecting previously unselected package glib-networking:amd64.
> Preparing to unpack .../19-glib-networking_2.80.0-1build1_amd64.deb ...
> Unpacking glib-networking:amd64 (2.80.0-1build1) ...
> Selecting previously unselected package libgraphene-1.0-0:amd64.
> Preparing to unpack .../20-libgraphene-1.0-0_1.10.8-3build2_amd64.deb ...
> Unpacking libgraphene-1.0-0:amd64 (1.10.8-3build2) ...
> Selecting previously unselected package liborc-0.4-0t64:amd64.
> Preparing to unpack .../21-liborc-0.4-0t64_1%3a0.4.38-1ubuntu0.1_amd64.deb ...
> Unpacking liborc-0.4-0t64:amd64 (1:0.4.38-1ubuntu0.1) ...
> Selecting previously unselected package libgstreamer-plugins-base1.0-0:amd64.
> Preparing to unpack .../22-libgstreamer-plugins-base1.0-0_1.24.2-1ubuntu0.2_amd64.deb ...
> Unpacking libgstreamer-plugins-base1.0-0:amd64 (1.24.2-1ubuntu0.2) ...
> Selecting previously unselected package libgudev-1.0-0:amd64.
> Preparing to unpack .../23-libgudev-1.0-0_1%3a238-5ubuntu1_amd64.deb ...
> Unpacking libgudev-1.0-0:amd64 (1:238-5ubuntu1) ...
> Selecting previously unselected package libgstreamer-gl1.0-0:amd64.
> Preparing to unpack .../24-libgstreamer-gl1.0-0_1.24.2-1ubuntu0.2_amd64.deb ...
> Unpacking libgstreamer-gl1.0-0:amd64 (1.24.2-1ubuntu0.2) ...
> Selecting previously unselected package gstreamer1.0-gl:amd64.
> Preparing to unpack .../25-gstreamer1.0-gl_1.24.2-1ubuntu0.2_amd64.deb ...
> Unpacking gstreamer1.0-gl:amd64 (1.24.2-1ubuntu0.2) ...
> Selecting previously unselected package libcdparanoia0:amd64.
> Preparing to unpack .../26-libcdparanoia0_3.10.2+debian-14build3_amd64.deb ...
> Unpacking libcdparanoia0:amd64 (3.10.2+debian-14build3) ...
> Selecting previously unselected package libogg0:amd64.
> Preparing to unpack .../27-libogg0_1.3.5-3build1_amd64.deb ...
> Unpacking libogg0:amd64 (1.3.5-3build1) ...
> Selecting previously unselected package libopus0:amd64.
> Preparing to unpack .../28-libopus0_1.4-1build1_amd64.deb ...
> Unpacking libopus0:amd64 (1.4-1build1) ...
> Selecting previously unselected package libtheora0:amd64.
> Preparing to unpack .../29-libtheora0_1.1.1+dfsg.1-16.1build3_amd64.deb ...
> Unpacking libtheora0:amd64 (1.1.1+dfsg.1-16.1build3) ...
> Selecting previously unselected package libvisual-0.4-0:amd64.
> Preparing to unpack .../30-libvisual-0.4-0_0.4.2-2build1_amd64.deb ...
> Unpacking libvisual-0.4-0:amd64 (0.4.2-2build1) ...
> Selecting previously unselected package libvorbis0a:amd64.
> Preparing to unpack .../31-libvorbis0a_1.3.7-1build3_amd64.deb ...
> Unpacking libvorbis0a:amd64 (1.3.7-1build3) ...
> Selecting previously unselected package libvorbisenc2:amd64.
> Preparing to unpack .../32-libvorbisenc2_1.3.7-1build3_amd64.deb ...
> Unpacking libvorbisenc2:amd64 (1.3.7-1build3) ...
> Selecting previously unselected package gstreamer1.0-plugins-base:amd64.
> Preparing to unpack .../33-gstreamer1.0-plugins-base_1.24.2-1ubuntu0.2_amd64.deb ...
> Unpacking gstreamer1.0-plugins-base:amd64 (1.24.2-1ubuntu0.2) ...
> Selecting previously unselected package libaa1:amd64.
> Preparing to unpack .../34-libaa1_1.4p5-51.1_amd64.deb ...
> Unpacking libaa1:amd64 (1.4p5-51.1) ...
> Selecting previously unselected package libraw1394-11:amd64.
> Preparing to unpack .../35-libraw1394-11_2.1.2-2build3_amd64.deb ...
> Unpacking libraw1394-11:amd64 (2.1.2-2build3) ...
> Selecting previously unselected package libavc1394-0:amd64.
> Preparing to unpack .../36-libavc1394-0_0.5.4-5build3_amd64.deb ...
> Unpacking libavc1394-0:amd64 (0.5.4-5build3) ...
> Selecting previously unselected package libcaca0:amd64.
> Preparing to unpack .../37-libcaca0_0.99.beta20-4build2_amd64.deb ...
> Unpacking libcaca0:amd64 (0.99.beta20-4build2) ...
> Selecting previously unselected package libdv4t64:amd64.
> Preparing to unpack .../38-libdv4t64_1.0.0-17.1build1_amd64.deb ...
> Unpacking libdv4t64:amd64 (1.0.0-17.1build1) ...
> Selecting previously unselected package libflac12t64:amd64.
> Preparing to unpack .../39-libflac12t64_1.4.3+ds-2.1ubuntu2_amd64.deb ...
> Unpacking libflac12t64:amd64 (1.4.3+ds-2.1ubuntu2) ...
> Selecting previously unselected package libgstreamer-plugins-good1.0-0:amd64.
> Preparing to unpack .../40-libgstreamer-plugins-good1.0-0_1.24.2-1ubuntu1.1_amd64.deb ...
> Unpacking libgstreamer-plugins-good1.0-0:amd64 (1.24.2-1ubuntu1.1) ...
> Selecting previously unselected package libiec61883-0:amd64.
> Preparing to unpack .../41-libiec61883-0_1.2.0-6build1_amd64.deb ...
> Unpacking libiec61883-0:amd64 (1.2.0-6build1) ...
> Selecting previously unselected package libmp3lame0:amd64.
> Preparing to unpack .../42-libmp3lame0_3.100-6build1_amd64.deb ...
> Unpacking libmp3lame0:amd64 (3.100-6build1) ...
> Selecting previously unselected package libmpg123-0t64:amd64.
> Preparing to unpack .../43-libmpg123-0t64_1.32.5-1ubuntu1.1_amd64.deb ...
> Unpacking libmpg123-0t64:amd64 (1.32.5-1ubuntu1.1) ...
> Selecting previously unselected package libasyncns0:amd64.
> Preparing to unpack .../44-libasyncns0_0.8-6build4_amd64.deb ...
> Unpacking libasyncns0:amd64 (0.8-6build4) ...
> Selecting previously unselected package libsndfile1:amd64.
> Preparing to unpack .../45-libsndfile1_1.2.2-1ubuntu5.24.04.1_amd64.deb ...
> Unpacking libsndfile1:amd64 (1.2.2-1ubuntu5.24.04.1) ...
> Selecting previously unselected package libpulse0:amd64.
> Preparing to unpack .../46-libpulse0_1%3a16.1+dfsg1-2ubuntu10.1_amd64.deb ...
> Unpacking libpulse0:amd64 (1:16.1+dfsg1-2ubuntu10.1) ...
> Selecting previously unselected package libspeex1:amd64.
> Preparing to unpack .../47-libspeex1_1.2.1-2ubuntu2.24.04.1_amd64.deb ...
> Unpacking libspeex1:amd64 (1.2.1-2ubuntu2.24.04.1) ...
> Selecting previously unselected package libshout3:amd64.
> Preparing to unpack .../48-libshout3_2.4.6-1build2_amd64.deb ...
> Unpacking libshout3:amd64 (2.4.6-1build2) ...
> Selecting previously unselected package libtag1v5-vanilla:amd64.
> Preparing to unpack .../49-libtag1v5-vanilla_1.13.1-1build1_amd64.deb ...
> Unpacking libtag1v5-vanilla:amd64 (1.13.1-1build1) ...
> Selecting previously unselected package libtag1v5:amd64.
> Preparing to unpack .../50-libtag1v5_1.13.1-1build1_amd64.deb ...
> Unpacking libtag1v5:amd64 (1.13.1-1build1) ...
> Selecting previously unselected package libtwolame0:amd64.
> Preparing to unpack .../51-libtwolame0_0.4.0-2build3_amd64.deb ...
> Unpacking libtwolame0:amd64 (0.4.0-2build3) ...
> Selecting previously unselected package libv4lconvert0t64:amd64.
> Preparing to unpack .../52-libv4lconvert0t64_1.26.1-4build3_amd64.deb ...
> Unpacking libv4lconvert0t64:amd64 (1.26.1-4build3) ...
> Selecting previously unselected package libv4l-0t64:amd64.
> Preparing to unpack .../53-libv4l-0t64_1.26.1-4build3_amd64.deb ...
> Unpacking libv4l-0t64:amd64 (1.26.1-4build3) ...
> Selecting previously unselected package libvpx9:amd64.
> Preparing to unpack .../54-libvpx9_1.14.0-1ubuntu2.2_amd64.deb ...
> Unpacking libvpx9:amd64 (1.14.0-1ubuntu2.2) ...
> Selecting previously unselected package libwavpack1:amd64.
> Preparing to unpack .../55-libwavpack1_5.6.0-1build1_amd64.deb ...
> Unpacking libwavpack1:amd64 (5.6.0-1build1) ...
> Selecting previously unselected package libsoup-3.0-common.
> Preparing to unpack .../56-libsoup-3.0-common_3.4.4-5ubuntu0.4_all.deb ...
> Unpacking libsoup-3.0-common (3.4.4-5ubuntu0.4) ...
> Selecting previously unselected package libsoup-3.0-0:amd64.
> Preparing to unpack .../57-libsoup-3.0-0_3.4.4-5ubuntu0.4_amd64.deb ...
> Unpacking libsoup-3.0-0:amd64 (3.4.4-5ubuntu0.4) ...
> Selecting previously unselected package gstreamer1.0-plugins-good:amd64.
> Preparing to unpack .../58-gstreamer1.0-plugins-good_1.24.2-1ubuntu1.1_amd64.deb ...
> Unpacking gstreamer1.0-plugins-good:amd64 (1.24.2-1ubuntu1.1) ...
> Selecting previously unselected package libxv1:amd64.
> Preparing to unpack .../59-libxv1_2%3a1.0.11-1.1build1_amd64.deb ...
> Unpacking libxv1:amd64 (2:1.0.11-1.1build1) ...
> Selecting previously unselected package gstreamer1.0-x:amd64.
> Preparing to unpack .../60-gstreamer1.0-x_1.24.2-1ubuntu0.2_amd64.deb ...
> Unpacking gstreamer1.0-x:amd64 (1.24.2-1ubuntu0.2) ...
> Selecting previously unselected package libayatana-ido3-0.4-0:amd64.
> Preparing to unpack .../61-libayatana-ido3-0.4-0_0.10.1-1build2_amd64.deb ...
> Unpacking libayatana-ido3-0.4-0:amd64 (0.10.1-1build2) ...
> Selecting previously unselected package libayatana-indicator3-7:amd64.
> Preparing to unpack .../62-libayatana-indicator3-7_0.9.4-1build1_amd64.deb ...
> Unpacking libayatana-indicator3-7:amd64 (0.9.4-1build1) ...
> Selecting previously unselected package libdbusmenu-glib4:amd64.
> Preparing to unpack .../63-libdbusmenu-glib4_18.10.20180917~bzr492+repack1-3.1ubuntu5_amd64.deb ...
> Unpacking libdbusmenu-glib4:amd64 (18.10.20180917~bzr492+repack1-3.1ubuntu5) ...
> Selecting previously unselected package libdbusmenu-gtk3-4:amd64.
> Preparing to unpack .../64-libdbusmenu-gtk3-4_18.10.20180917~bzr492+repack1-3.1ubuntu5_amd64.deb ...
> Unpacking libdbusmenu-gtk3-4:amd64 (18.10.20180917~bzr492+repack1-3.1ubuntu5) ...
> Selecting previously unselected package libayatana-appindicator3-1.
> Preparing to unpack .../65-libayatana-appindicator3-1_0.5.93-1build3_amd64.deb ...
> Unpacking libayatana-appindicator3-1 (0.5.93-1build3) ...
> Selecting previously unselected package libharfbuzz-icu0:amd64.
> Preparing to unpack .../66-libharfbuzz-icu0_8.3.0-2build2_amd64.deb ...
> Unpacking libharfbuzz-icu0:amd64 (8.3.0-2build2) ...
> Selecting previously unselected package libhyphen0:amd64.
> Preparing to unpack .../67-libhyphen0_2.8.8-7build3_amd64.deb ...
> Unpacking libhyphen0:amd64 (2.8.8-7build3) ...
> Selecting previously unselected package libjavascriptcoregtk-4.1-0:amd64.
> Preparing to unpack .../68-libjavascriptcoregtk-4.1-0_2.48.3-0ubuntu0.24.04.1_amd64.deb ...
> Unpacking libjavascriptcoregtk-4.1-0:amd64 (2.48.3-0ubuntu0.24.04.1) ...
> Selecting previously unselected package libjson-glib-1.0-common.
> Preparing to unpack .../69-libjson-glib-1.0-common_1.8.0-2build2_all.deb ...
> Unpacking libjson-glib-1.0-common (1.8.0-2build2) ...
> Selecting previously unselected package libjson-glib-1.0-0:amd64.
> Preparing to unpack .../70-libjson-glib-1.0-0_1.8.0-2build2_amd64.deb ...
> Unpacking libjson-glib-1.0-0:amd64 (1.8.0-2build2) ...
> Selecting previously unselected package libmanette-0.2-0:amd64.
> Preparing to unpack .../71-libmanette-0.2-0_0.2.7-1build2_amd64.deb ...
> Unpacking libmanette-0.2-0:amd64 (0.2.7-1build2) ...
> Selecting previously unselected package libwebrtc-audio-processing1:amd64.
> Preparing to unpack .../72-libwebrtc-audio-processing1_0.3.1-0ubuntu6_amd64.deb ...
> Unpacking libwebrtc-audio-processing1:amd64 (0.3.1-0ubuntu6) ...
> Selecting previously unselected package libspa-0.2-modules:amd64.
> Preparing to unpack .../73-libspa-0.2-modules_1.0.5-1ubuntu3_amd64.deb ...
> Unpacking libspa-0.2-modules:amd64 (1.0.5-1ubuntu3) ...
> Selecting previously unselected package libpipewire-0.3-0t64:amd64.
> Preparing to unpack .../74-libpipewire-0.3-0t64_1.0.5-1ubuntu3_amd64.deb ...
> Unpacking libpipewire-0.3-0t64:amd64 (1.0.5-1ubuntu3) ...
> Selecting previously unselected package libpipewire-0.3-common.
> Preparing to unpack .../75-libpipewire-0.3-common_1.0.5-1ubuntu3_all.deb ...
> Unpacking libpipewire-0.3-common (1.0.5-1ubuntu3) ...
> Selecting previously unselected package libsecret-common.
> Preparing to unpack .../76-libsecret-common_0.21.4-1build3_all.deb ...
> Unpacking libsecret-common (0.21.4-1build3) ...
> Selecting previously unselected package libsecret-1-0:amd64.
> Preparing to unpack .../77-libsecret-1-0_0.21.4-1build3_amd64.deb ...
> Unpacking libsecret-1-0:amd64 (0.21.4-1build3) ...
> Selecting previously unselected package libgles2:amd64.
> Preparing to unpack .../78-libgles2_1.7.0-1build1_amd64.deb ...
> Unpacking libgles2:amd64 (1.7.0-1build1) ...
> Selecting previously unselected package xdg-dbus-proxy.
> Preparing to unpack .../79-xdg-dbus-proxy_0.1.5-1build2_amd64.deb ...
> Unpacking xdg-dbus-proxy (0.1.5-1build2) ...
> Selecting previously unselected package libwebpdemux2:amd64.
> Preparing to unpack .../80-libwebpdemux2_1.3.2-0.4build3_amd64.deb ...
> Unpacking libwebpdemux2:amd64 (1.3.2-0.4build3) ...
> Selecting previously unselected package libwebpmux3:amd64.
> Preparing to unpack .../81-libwebpmux3_1.3.2-0.4build3_amd64.deb ...
> Unpacking libwebpmux3:amd64 (1.3.2-0.4build3) ...
> Selecting previously unselected package libwoff1:amd64.
> Preparing to unpack .../82-libwoff1_1.0.2-2build1_amd64.deb ...
> Unpacking libwoff1:amd64 (1.0.2-2build1) ...
> Selecting previously unselected package libxslt1.1:amd64.
> Preparing to unpack .../83-libxslt1.1_1.1.39-0exp1ubuntu0.24.04.2_amd64.deb ...
> Unpacking libxslt1.1:amd64 (1.1.39-0exp1ubuntu0.24.04.2) ...
> Selecting previously unselected package libwebkit2gtk-4.1-0:amd64.
> Preparing to unpack .../84-libwebkit2gtk-4.1-0_2.48.3-0ubuntu0.24.04.1_amd64.deb ...
> Unpacking libwebkit2gtk-4.1-0:amd64 (2.48.3-0ubuntu0.24.04.1) ...
> Selecting previously unselected package xdg-desktop-portal.
> Preparing to unpack .../85-xdg-desktop-portal_1.18.4-1ubuntu2.24.04.1_amd64.deb ...
> Unpacking xdg-desktop-portal (1.18.4-1ubuntu2.24.04.1) ...
> Selecting previously unselected package xdg-desktop-portal-gtk.
> Preparing to unpack .../86-xdg-desktop-portal-gtk_1.15.1-1build2_amd64.deb ...
> Unpacking xdg-desktop-portal-gtk (1.15.1-1build2) ...
> Selecting previously unselected package amazon-q.
> Preparing to unpack .../87-amazon-q.deb ...
> Unpacking amazon-q (1.12.1) ...
> Setting up libpipewire-0.3-common (1.0.5-1ubuntu3) ...
> Setting up bubblewrap (0.9.0-1ubuntu0.1) ...
> Setting up libcdparanoia0:amd64 (3.10.2+debian-14build3) ...
> Setting up libraw1394-11:amd64 (2.1.2-2build3) ...
> Setting up libproxy1v5:amd64 (0.5.4-4build1) ...
> Setting up libtag1v5-vanilla:amd64 (1.13.1-1build1) ...
> Setting up libharfbuzz-icu0:amd64 (8.3.0-2build2) ...
> Setting up libogg0:amd64 (1.3.5-3build1) ...
> Setting up libspeex1:amd64 (1.2.1-2ubuntu2.24.04.1) ...
> Setting up libcaca0:amd64 (0.99.beta20-4build2) ...
> Setting up libv4lconvert0t64:amd64 (1.26.1-4build3) ...
> Setting up libtwolame0:amd64 (0.4.0-2build3) ...
> Setting up libwoff1:amd64 (1.0.2-2build1) ...
> Setting up libhyphen0:amd64 (2.8.8-7build3) ...
> Setting up libvisual-0.4-0:amd64 (0.4.2-2build1) ...
> Setting up libaspell15:amd64 (0.60.8.1-1build1) ...
> Setting up libwebpdemux2:amd64 (1.3.2-0.4build3) ...
> Setting up libdbusmenu-glib4:amd64 (18.10.20180917~bzr492+repack1-3.1ubuntu5) ...
> Setting up libwebrtc-audio-processing1:amd64 (0.3.1-0ubuntu6) ...
> Setting up libsoup-3.0-common (3.4.4-5ubuntu0.4) ...
> Setting up libmpg123-0t64:amd64 (1.32.5-1ubuntu1.1) ...
> Setting up libayatana-ido3-0.4-0:amd64 (0.10.1-1build2) ...
> Setting up liborc-0.4-0t64:amd64 (1:0.4.38-1ubuntu0.1) ...
> Setting up libasound2-data (1.2.11-1build2) ...
> Setting up libjavascriptcoregtk-4.1-0:amd64 (2.48.3-0ubuntu0.24.04.1) ...
> Setting up libgles2:amd64 (1.7.0-1build1) ...
> Setting up libasound2t64:amd64 (1.2.11-1build2) ...
> Setting up emacsen-common (3.0.5) ...
> Setting up libspa-0.2-modules:amd64 (1.0.5-1ubuntu3) ...
> Setting up libncurses6:amd64 (6.4+20240113-1ubuntu2) ...
> Setting up libopus0:amd64 (1.4-1build1) ...
> Setting up libxv1:amd64 (2:1.0.11-1.1build1) ...
> Setting up libvorbis0a:amd64 (1.3.7-1build3) ...
> Setting up libdv4t64:amd64 (1.0.0-17.1build1) ...
> Setting up libv4l-0t64:amd64 (1.26.1-4build3) ...
> Setting up xdg-dbus-proxy (0.1.5-1build2) ...
> Setting up libvpx9:amd64 (1.14.0-1ubuntu2.2) ...
> Setting up alsa-topology-conf (1.2.5.1-2) ...
> Setting up libtag1v5:amd64 (1.13.1-1build1) ...
> Setting up libasyncns0:amd64 (0.8-6build4) ...
> Setting up libwavpack1:amd64 (5.6.0-1build1) ...
> Setting up libtheora0:amd64 (1.1.1+dfsg.1-16.1build3) ...
> Setting up libxslt1.1:amd64 (1.1.39-0exp1ubuntu0.24.04.2) ...
> Setting up libjson-glib-1.0-common (1.8.0-2build2) ...
> Setting up libflac12t64:amd64 (1.4.3+ds-2.1ubuntu2) ...
> Setting up libhunspell-1.7-0:amd64 (1.7.2+really1.7.2-10build3) ...
> Setting up glib-networking-common (2.80.0-1build1) ...
> Setting up libayatana-indicator3-7:amd64 (0.9.4-1build1) ...
> Setting up libwebpmux3:amd64 (1.3.2-0.4build3) ...
> Setting up libevdev2:amd64 (1.13.1+dfsg-1build1) ...
> Setting up libpipewire-0.3-0t64:amd64 (1.0.5-1ubuntu3) ...
> Setting up libgudev-1.0-0:amd64 (1:238-5ubuntu1) ...
> Setting up libsecret-common (0.21.4-1build3) ...
> Setting up libmp3lame0:amd64 (3.100-6build1) ...
> Setting up libgraphene-1.0-0:amd64 (1.10.8-3build2) ...
> Setting up libvorbisenc2:amd64 (1.3.7-1build3) ...
> Setting up libaa1:amd64 (1.4p5-51.1) ...
> Setting up libiec61883-0:amd64 (1.2.0-6build1) ...
> Setting up libavc1394-0:amd64 (0.5.4-5build3) ...
> Setting up glib-networking-services (2.80.0-1build1) ...
> Setting up libdbusmenu-gtk3-4:amd64 (18.10.20180917~bzr492+repack1-3.1ubuntu5) ...
> Setting up dictionaries-common (1.29.7) ...
> Setting up alsa-ucm-conf (1.2.10-1ubuntu5.4) ...
> Setting up libmanette-0.2-0:amd64 (0.2.7-1build2) ...
> Setting up libgstreamer-plugins-base1.0-0:amd64 (1.24.2-1ubuntu0.2) ...
> Setting up libjson-glib-1.0-0:amd64 (1.8.0-2build2) ...
> Setting up libsecret-1-0:amd64 (0.21.4-1build3) ...
> Setting up libgstreamer-plugins-good1.0-0:amd64 (1.24.2-1ubuntu1.1) ...
> Setting up libgstreamer-gl1.0-0:amd64 (1.24.2-1ubuntu0.2) ...
> Setting up gstreamer1.0-plugins-base:amd64 (1.24.2-1ubuntu0.2) ...
> Setting up libayatana-appindicator3-1 (0.5.93-1build3) ...
> Setting up libshout3:amd64 (2.4.6-1build2) ...
> Setting up aspell (0.60.8.1-1build1) ...
> Setting up hunspell-en-us (1:2020.12.07-2) ...
> Setting up libsndfile1:amd64 (1.2.2-1ubuntu5.24.04.1) ...
> Setting up glib-networking:amd64 (2.80.0-1build1) ...
> Setting up gstreamer1.0-gl:amd64 (1.24.2-1ubuntu0.2) ...
> Setting up gstreamer1.0-x:amd64 (1.24.2-1ubuntu0.2) ...
> Setting up xdg-desktop-portal (1.18.4-1ubuntu2.24.04.1) ...
> Created symlink /etc/systemd/user/graphical-session-pre.target.wants/xdg-desktop-portal-rewrite-launchers.service → /usr/lib/systemd/user/xdg-desktop-portal-rewrite-launchers.service.
> Setting up libpulse0:amd64 (1:16.1+dfsg1-2ubuntu10.1) ...
> Setting up libenchant-2-2:amd64 (2.3.3-2build2) ...
> Setting up libsoup-3.0-0:amd64 (3.4.4-5ubuntu0.4) ...
> Setting up aspell-en (2020.12.07-0-1) ...
> Setting up enchant-2 (2.3.3-2build2) ...
> Setting up xdg-desktop-portal-gtk (1.15.1-1build2) ...
> Setting up gstreamer1.0-plugins-good:amd64 (1.24.2-1ubuntu1.1) ...
> Setting up libwebkit2gtk-4.1-0:amd64 (2.48.3-0ubuntu0.24.04.1) ...
> Setting up amazon-q (1.12.1) ...
> Processing triggers for libc-bin (2.39-0ubuntu8.4) ...
> Processing triggers for man-db (2.12.0-4build2) ...
> Processing triggers for libglib2.0-0t64:amd64 (2.80.0-6ubuntu3.4) ...
> Processing triggers for hicolor-icon-theme (0.17-2) ...
> Processing triggers for dictionaries-common (1.29.7) ...
> aspell-autobuildhash: processing: en [en-common].
> aspell-autobuildhash: processing: en [en-variant_0].
> aspell-autobuildhash: processing: en [en-variant_1].
> aspell-autobuildhash: processing: en [en-variant_2].
> aspell-autobuildhash: processing: en [en-w_accents-only].
> aspell-autobuildhash: processing: en [en-wo_accents-only].
> aspell-autobuildhash: processing: en [en_AU-variant_0].
> aspell-autobuildhash: processing: en [en_AU-variant_1].
> aspell-autobuildhash: processing: en [en_AU-w_accents-only].
> aspell-autobuildhash: processing: en [en_AU-wo_accents-only].
> aspell-autobuildhash: processing: en [en_CA-variant_0].
> aspell-autobuildhash: processing: en [en_CA-variant_1].
> aspell-autobuildhash: processing: en [en_CA-w_accents-only].
> aspell-autobuildhash: processing: en [en_CA-wo_accents-only].
> aspell-autobuildhash: processing: en [en_GB-ise-w_accents-only].
> aspell-autobuildhash: processing: en [en_GB-ise-wo_accents-only].
> aspell-autobuildhash: processing: en [en_GB-ize-w_accents-only].
> aspell-autobuildhash: processing: en [en_GB-ize-wo_accents-only].
> aspell-autobuildhash: processing: en [en_GB-variant_0].
> aspell-autobuildhash: processing: en [en_GB-variant_1].
> aspell-autobuildhash: processing: en [en_US-w_accents-only].
> aspell-autobuildhash: processing: en [en_US-wo_accents-only].
> N: Download is performed unsandboxed as root as file '/home/inoue/amazon-q.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
>
インストールが終わったら、Builder IDでログインします。
q login
ログインした様子です。
ポーカーゲームを作る
今回はちょっと欲張って、詳細な要求をしてみました。一発出しでどこまで実装できるのか試すことが目的です。
Amazon Q CLIはどこまでやってくれるでしょうか。
q chat --trust-all-tools << 'EOF'
The Unicode Standard Playing Cards(範囲: 1F0A0~1F0FF)を用いて、Webブラウザ上で動作するポーカーゲームを作成してください。
画面はマウスで操作できる必要があります。
ソースコードはTypeScriptで記述し、ポーカーの役はテストコードを用いてユニットテストを実行できるようにしてください。
画面のレイアウト(ゲーム画面の縦横幅、トランプのサイズなど)はキリの良い8の倍数で組んでください。
EOF
このコマンドを実行すると、Amazon Q CLIはプロジェクト全体の構成から考えてくれました。
-
package.json
でnpmプロジェクトの設定 -
tsconfig.json
でTypeScriptの設定 -
jest.config.js
でテスト環境の設定
そして、堅牢なクラス構成で実装を開始しました。
-
Card
クラス: トランプカードを表現 -
Deck
クラス: デッキの管理 -
PokerHand
クラス: ポーカーの役判定 -
PokerGame
クラス: ゲームロジック -
GameUI
クラス: ユーザーインターフェース
Unicode絵文字の参照について
今回の目的であるUnicodeのトランプカード(🂡🂢🂣など)を参照する部分は以下のような実装となりました。
getUnicodeChar(): string {
const baseCode = 0x1F0A0;
let offset = 0;
switch (this.suit) {
case Suit.SPADES: offset = 0x00; break;
case Suit.HEARTS: offset = 0x10; break;
case Suit.DIAMONDS: offset = 0x20; break;
case Suit.CLUBS: offset = 0x30; break;
}
let rankOffset = this.rank;
if (this.rank === Rank.JACK) rankOffset = 11;
else if (this.rank === Rank.QUEEN) rankOffset = 13;
else if (this.rank === Rank.KING) rankOffset = 14;
return String.fromCodePoint(baseCode + offset + rankOffset);
}
コードポイントから各マークの参照を作成する方法はC言語での大文字 ⇔ 小文字変換の考え方に似ていて勉強になりました。
テスト実装について
ユニットテストについても28個のテストケースで全機能をカバーしていました。
しかし、最初にテストを実行したときは、以下のエラーが発生しました。
● Validation Warning:
Unknown option "moduleNameMapping" with value {"^(\\.{1,2}/.*)\\.js$": "$1"} was found.
ts-jest[ts-jest-transformer] (WARN) Define `ts-jest` config under `globals` is deprecated.
Amazon Q CLIではテスト実行時にエラーが発生すると、そのまま修正と再実行まで対応してくれました。
-
moduleNameMapping
を正しいmoduleNameMapper
に修正 - 古いts-jest設定を新しい形式に変更
- ロイヤルフラッシュの判定ロジックの修正
そして、何度かの自動修正を経て、最終的に全てのテストが通るようになりました。
PASS src/__tests__/card.test.ts
PASS src/__tests__/deck.test.ts
PASS src/__tests__/poker-hand.test.ts
PASS src/__tests__/poker-game.test.ts
Test Suites: 4 passed, 4 total
Tests: 28 passed, 28 total
エラーを見つけて自動で修正してくれるのは、なかなか便利です。
問題発生と解決過程
しかし、コードが完璧でも実際に動かしてみると問題が見つかりました。
ここからはAmazon Q CLIとやり取りしながら修正を進めていきました。
最初の問題:404エラー
HTMLを実行すると、game-uiで404エラーが発生しました。原因は、ES Modulesでの相対インポートに.js
拡張子が必要だったことです。
// 修正前
import { GameUI } from './game-ui';
// 修正後
import { GameUI } from './game-ui.js';
問題が発生した際の画像:
2つ目の問題:カードが見えない
ゲーム画面は表示されるようになりましたが、カード部分が真っ白…。HTMLを確認するとemoji文字は出力されているのに、画面に出てきません。
調べてみると、カードの文字色が白に設定されていたため、白い背景のカードで見えなくなっていました。
color: black !important;
この一行で解決しましたが、!important
を使っている点は少々惜しいと思いました。
問題が発生した際の画像:
3つ目の問題:選択状態の混在
プレイヤーがカードを選択すると、ディーラーの同じ位置のカードも選択状態になる問題が発生しました。
原因は、選択状態を管理するSetが共通だったことです。
// 修正前
private selectedCards: Set<number> = new Set();
// 修正後
private selectedPlayerCards: Set<number> = new Set();
プレイヤー専用の選択状態管理に変更して解決しました。
問題が発生した際の画像:
最終的な完成品
最終的にできあがったポーカーゲームの特徴は以下の通りです。
- 直感的なマウス操作(クリックで選択、最大3枚交換可能)
- 完全なポーカー役判定(ロイヤルフラッシュまで対応)
- レスポンシブな選択・ホバー効果
ポーカーとして遊べる状態になりました。
まとめ
今回は、Unicodeの絵文字を使ったポーカーゲームを作ってみました。Amazon Q CLIはコマンド単発でも画面が表示されるところまで作りこみができることがわかりました。
一発出しはまだできず、Amazon Q CLIと複数回やり取りをしてソースコードを修正する必要がありましたが、最終的にはしっかり遊べるゲームが完成しました。
今回作ったソースコード一式は以下のURLからご覧いただけます。
Discussion